Boolean Commands

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.0


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.

In addition, the following 4D commands return a Boolean result: Activated, After, Before, Before selection, Before subselection, Caps lock down, Compiled application, Deactivated, During, End selection, End subselection, In break, In footer, In header, In transaction, Is a list, Is a variable, Is in set, Is user deleted, Locked, Macintosh command down, Macintosh control down, Macintosh option down, Modified, Modified record, Nil, Outside call, Read only state, Semaphore, Shift down, True, Undefined, User in group, Windows Alt down, Windows Ctrl down.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next