$IF NOT....$ENDIF is given in the PB help listing but not in my old manual. It does not seem to work, and just compiles it regardless of the parameter value. But, it doesn't give an error when you compile.
Try this, and change %RDSpro from 0 to 1:
------------------------------------------
cls
%RDSpro=0 'both if 1 only ifnot if 0
$IF %RDSpro
PRINT " if "
$ENDIF
$IF NOT %RDSpro
PRINT " if not"
$ENDIF
end
-----------------------------------------
It should toggle, showing one or the other. Instead you get both if =1, and only "if not" if =0
Try this, and change %RDSpro from 0 to 1:
------------------------------------------
cls
%RDSpro=0 'both if 1 only ifnot if 0
$IF %RDSpro
PRINT " if "
$ENDIF
$IF NOT %RDSpro
PRINT " if not"
$ENDIF
end
-----------------------------------------
It should toggle, showing one or the other. Instead you get both if =1, and only "if not" if =0
Comment