4D v14.3

Boolean Commands

Home

 
4D v14.3
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

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)