Home

Add

Edit

Without Linenumbers

Code in Textfield


  1. #PRINT TRY Ifndef
    
  2. #IF Defined(TEST1)
    
  3.     #IFNDEF(TEST2)
    
  4.         #PRINT Not-TEST2-OK
    
  5.     #ELSE
    
  6.         #PRINT Not-TEST2-Else
    
  7.     #ENDIF
    
  8. #ENDIF
    
  9. 
    
  10. #PRINT
    
  11. #PRINT
    
  12. #PRINT TRY If Not Defined
    
  13. #IF Defined(TEST1)
    
  14.     #IF Not Defined(TEST2)
    
  15.         #PRINT Not-TEST2-OK
    
  16.     #ELSE
    
  17.         #PRINT Not-TEST2-Else
    
  18.     #ENDIF
    
  19. #ENDIF
    



tpm@lara:$ fbc test.bas -d TEST1 -d TEST2
TRY IFNDEF
test.bas(4) error 3: Expected End-of-Line in '#IFNDEF(TEST2)'
NOT-TEST2-OK


TRY IF NOT DEFINED
NOT-TEST2-ELSE
tpm@lara:$