#ENDIF
#If [Expression=true] ..Compile This Code .. #ENDIF
 
Parameters: NONE
Returns: NONE
 

      #ENDIF is used in combination with the conditional #IF directive. #If performs a comparison of a constant expression, if the expression resolves to be True, the code following the #IF statement and between the #ENDIF statements will be compiled. If not, then the code between the #IF-#ENDIF will be ignored.

      For more information on the logic behind #IF / #ENDIF statements, please refer to the #IF page.



FACTS:


      * #IF/#ENDIF directives are evaluated at compile time.




Mini Tutorial:


      This simple examples shows how to use th #IF/#ENDIF directives to conditional compile a section of code.

  
  
  Constant MyFlag = 100
  
; Compare the MYFLAG constant during compilation with 50. If the constant
; is greated than 50, then the compiler will include this code section.
; if not.. it will ignore those lines completely.
  
  #IF  MyFlag > 50
     Print "Yes My Flag was bigger than 50"
     Print "Yippie"
     
  #ENDIF
  
  
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




 
Related Info: #IF | Comparisons | If :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com