?define question

Previous topic - Next topic

Gary

I have checked the manual, searched for forums but cannot see where I am going wrong when I try to use ?DEFINE

I am porting some C code and it has heavy use of #DEFINE which I assumed I could just swap for ?DEFINE but it seems im doing something wrong

This is some example code

Code (glbasic) Select
?DEFINE SPIN_TO_WIN 1
PRINT SPIN_TO_WIN,0,0
SHOWSCREEN
KEYWAIT


and this displays 0 instead of the 1 I expected.

Thanks for your help

Gary

MrTAToad

?DEFINE'd variables can't be accessed from GLBasic - they are really for changing what gets compiled.

If you want to convert #DEFINE, you would use CONSTANT

Gary

Ah ok, I understand

Thanks for the info