?UNDEF in ?IF

Previous topic - Next topic

MrTAToad

It appears that an ?UNDEF command will be executed no matter whether the ?IF command is valid or not.

Eg :

?IFDEF WINCE
   ?WARNING "Compiling for Windows CE"

   ?UNDEF ALLOW_HISCOREUPLOAD
   ?UNDEF ALLOW_PROGRAMUPDATE
   ?UNDEF ALLOW_SCREENRESCHANGE
   ?UNDEF ALLOW_FULLSCREEN

   CONSTANT default_screenWidth%=320
   CONSTANT default_screenHeight%=480
   CONSTANT default_allowWebUpload%=TRUE
   CONSTANT default_useFullScreen%=TRUE
   CONSTANT default_allowProgramUpdate%=TRUE
   CONSTANT defaultResString$="320x480"
?ENDIF

Even though I wasn't compiling for Windows CE, the four ?UNDEF statements were still be processed...

FutureCow

Can't test at the moment, but according to the doco it looks like you should have
Code (glbasic) Select
?IF WINCE and not
Code (glbasic) Select
?IFDEF WINCE

Kitty Hello

Both should be ok. The unfed seems a bug, sorry.

MrTAToad

Yes, both ?IF and ?IFDEF work - the former is used if ?DEFINE has been used with a value.

MrTAToad

It also happens with ?DEFINE too...