This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
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
Not
True

 
PROPERTIES 

Product: 4D
Theme: Boolean

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)