Then
If <.expression.> Then <.statement.>
 
Parameters: NONE
Returns: NONE
 

      Then is used in combination with the conditional IF statement. If performs a comparison upon the result of an expression. When If the expression resolves to be True, the code following the THEN statement is executed. If it's False then everything following the Then is ignored.

      For more information on IF/THEN statements please refer to the IF page.




FACTS:


      * Then is NOT required with IF/ENDIF or IF/ELSE/ENDIF decision structures.




Mini Tutorial:


      Display a message IF a value is higher than 50

  
; Compare a random number with 50 and display a message IF that value
; is greater than 50..  if not.. nothing will be displayed
  
  If  Rnd(100> 50 Then Print "This random value IS greater than 50"
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




 
Related Info: Comparisons | Else | ElseIf | If | Select :
 


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