Preprocessor

Previous topic - Next topic

bigsofty

Code (glbasic) Select
?IFDEF IPHONE // Placing a remark here always activates the next line!!
PRINT "Blah!", isAt.x%-4, isAt.y%-4
?ENDIF


Remarks on preprocessor commands, seem to mess up their logic.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

bigsofty

Another small preprocessor problem...

When you define a preprocessor command is only has scope within the GLBasic module that its defined in. So my GLBasic program has 8 modules, I have to make 8 ?DEFINES, one each for each module to get my ?IFDEF commands working across all my code.  :blink:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

I think that's all covered now.
The ?DEFINE from the main program file stay thoughout the whole program now.

MrTAToad

Great!  That saves having to duplicate various TYPES

bigsofty

Thanks Gernot.  :)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)