Restored from previous forum. Originally posted by tinman.
Further to my XOR escapades recently, I have some more things which I
think need to be added to PB.
* Bitwise XOR, bitwise NOT
* Bin command, same as Hex (I know, there is one in an external lib,
but surely it would make more sense if it was in the PB String lib)
* Macros
* Memory allocation routines that are not based on bank numbers
* "CompilerError " command - stops the compiler and shows
the specified error string. Useful for macros and conditional compiler
blocks.
* Linux and Amiga INI libraries - you could use the ini.library on
the Amiga to make it easier
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
Various things
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
I agree about xor and not. The Bin$ command was included, AFAIK, in the last PB release as an user library, as functional as any other PB library. I must add that it is also available in the MathExtras library (I've not deleted it because it's faster than Bin$).
Macros would be cool, but it implies a two pass compiler. I wouldn't mind that, but maybe people working in huge projects would find compile time so long. I don't know, my projects are so little for that.
I don't undestand your problem with the memory library, it works alright and the commands make sense.
What you say about errors detected by the compiler is working. If I knew how to add debugger support to my libraries, I would add it. Anyway, it works.
I don't know about Linux, but Amiga uses .prefs files with a different format than INI, so it makes sense to code front-end libs for that. It would astound me to see an INI file for an Amiga program. I don't want M$ to put it's dirty hands on Amiga, even if it's only in the form of an inoccent configuration format.
Bye,
El_Choni
I agree about xor and not. The Bin$ command was included, AFAIK, in the last PB release as an user library, as functional as any other PB library. I must add that it is also available in the MathExtras library (I've not deleted it because it's faster than Bin$).
Macros would be cool, but it implies a two pass compiler. I wouldn't mind that, but maybe people working in huge projects would find compile time so long. I don't know, my projects are so little for that.
I don't undestand your problem with the memory library, it works alright and the commands make sense.
What you say about errors detected by the compiler is working. If I knew how to add debugger support to my libraries, I would add it. Anyway, it works.
I don't know about Linux, but Amiga uses .prefs files with a different format than INI, so it makes sense to code front-end libs for that. It would astound me to see an INI file for an Amiga program. I don't want M$ to put it's dirty hands on Amiga, even if it's only in the form of an inoccent configuration format.
Bye,
El_Choni
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
me why, I just am) then it's a complete pain to have to allocate
memory and keep track of bank numbers, which ones you have used etc.
Unless I misunderstood the "#Memory" parameter in the docs (which
don't explain it).
suggesting adding a command which forces the compiler to give an
error, and it allows you to specify the error message. Consider this:
#Amiga = 0 : #Windows = 1 : #Linux = 2
#OS = #Amiga
CompilerSelect #OS
CompilerCase #Amiga
; Do Amiga specific stuff here
CompilerSelect #Windows
; Windows specific
CompilerSelect #Linux
; Linux specific
CompilerDefault
CompilerError "Sorry, I haven't worked out the API of that OS
works"
CompilerEndSelect
preferences.library on Aminet. However, for the sake of any
crossplatform development, it would be far easier if INI file handling
was available for all PB platforms - you then only need one piece of
code, and even the possibility to share preference files.
Oh, and there are a few programs which use INI files on the Amiga -
why do you think someone wrote ini.library?
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
Because if you are writing, e.g. your own linked list code (don't askI don't undestand your problem with the memory library, it works alright and the commands make sense.
me why, I just am) then it's a complete pain to have to allocate
memory and keep track of bank numbers, which ones you have used etc.
Unless I misunderstood the "#Memory" parameter in the docs (which
don't explain it).
No, it's got nothing to do with the compiler detecting errors. I'mWhat you say about errors detected by the compiler is working. If I knew how to add debugger support to my libraries, I would add it. Anyway, it works.
suggesting adding a command which forces the compiler to give an
error, and it allows you to specify the error message. Consider this:
#Amiga = 0 : #Windows = 1 : #Linux = 2
#OS = #Amiga
CompilerSelect #OS
CompilerCase #Amiga
; Do Amiga specific stuff here
CompilerSelect #Windows
; Windows specific
CompilerSelect #Linux
; Linux specific
CompilerDefault
CompilerError "Sorry, I haven't worked out the API of that OS
works"
CompilerEndSelect
If you really have to have .prefs file stuff, check out theI don't know about Linux, but Amiga uses .prefs files with a different format than INI, so it makes sense to code front-end libs for that. It would astound me to see an INI file for an Amiga program. I don't want M$ to put it's dirty hands on Amiga, even if it's only in the form of an inoccent configuration format.
preferences.library on Aminet. However, for the sake of any
crossplatform development, it would be far easier if INI file handling
was available for all PB platforms - you then only need one piece of
code, and even the possibility to share preference files.
Oh, and there are a few programs which use INI files on the Amiga -
why do you think someone wrote ini.library?

--
It's not minimalist - I'm increasing efficiency by reducing input effort.
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm