4D v13.4

Boolean Commands

Home

 
4D v13.4
Boolean Commands

Boolean Commands  


 

 

4D includes Boolean functions, are used for Boolean calculations:

 True
 False
 Not

Example  

This example sets a Boolean variable based on the value of a button. It returns True in myBoolean if the myButton button was clicked and False if the button was not clicked. When a button is clicked, the button variable is set to 1.

 If(myButton=1) ` If the button was clicked
    myBoolean:=True ` myBoolean is set to True
 Else ` If the button was not clicked,
    myBoolean:=False ` myBoolean is set to False
 End if

The previous example can be simplified into one line.

 myBoolean:=(myButton=1)

 
PROPERTIES 

Product: 4D
Theme: Boolean

 
SEE ALSO 

False
Logical Operators
Not
True