EVEN
Result = EVEN(Value)
 
Parameters:

    Value=Value to test
Returns:

    Result
 

      EVEN returns (True) 1 if the value is even, otherwise it returns 0.




Mini Tutorial:


      Showing the use of the functions ODD and EVEN

  
; two values we want to test
  Value1 = 42
  Value2 = 13
  
; check if value1 and value2 are odd or even
  If Odd(Value1)
     Print "Value1 is odd"
  Else
     Print "Value1 is even"
  EndIf
  
  If Even(Value2)
     Print "Value2 is even"
  Else
     Print "Value2 is odd"
  EndIf
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  Value1 is Even
  Value2 is Odd
  





 
Related Info: Ceil | Floor | ODD | Range | RoundDown | RoundUp :
 


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