Various things

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
I don't undestand your problem with the memory library, it works alright and the commands make sense.
Because if you are writing, e.g. your own linked list code (don't ask
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).
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.
No, it's got nothing to do with the compiler detecting errors. I'm
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
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.
If you really have to have .prefs file stuff, check out the
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? :wink:


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

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

i agree with El_Choni amiga has its own way with the ENV-ARC:
and enviroments (prefs) pure until now support natively the
OSes ,thats my opinion thought , for OS indepented software
i use a plain text file

Christos
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

A .INI file is plain text, so i think its
easy possible to write 3 INI-Libraries with
the same commands, so we can use .INI on
all 3 platforms.

cya,
...Danilo

(registered PureBasic user)
Post Reply