#define for constants

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

#define for constants

Post by Justin »

This is to maintain compability with windows resource .rc files. The problem now is PB constants syntax is not compatible with .rc syntax.

so
#define name value

would be an alternate way to define a constant in PB, note the constant name does not have #. i don't know if this would be a big mess for Fred but it would open all the resource possibilities because the .rc file and the pb source could share the same constants include. now resources are just too difficult to use because you need to maintain 2 constant files, one for .rc and another for .pb.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

well, you could easily write a little converter, could you not? that way you'd only have to maintain one set
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply