4D v16.3

Boolean Commands

Home

 
4D v16.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)



See also 

False
Logical Operators
Not
True

 
PROPERTIES 

Product: 4D
Theme: Boolean

 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)