A Boolean variable is restricted to a binary state.  This means it can only be one of two values.  In numerical terms it is either a 1 or a 0.  Two Trading Blox constants are available as variable terms to denote each of the binary state values allowed a Boolean.

 

Only a parameter can be declare as a Boolean type variable, but an Integer is often used to denote a True or False condition, so an Integer can be used as a scripting value to accept the value of a Boolean parameter, or provide a binary state process.

 

When a parameter is declared as a Boolean, the user will see a parameter on the Main screen displayed with selection list option that allows the user to select either True or False.  If the user checked the "Stepping Enabled" option for the Boolean parameter, the Boolean parameter variable will still only have two options, but Trading Blox display a third option "Step True to False" that will enable Trading Blox to automatically step the value between True and False during a test.

 

Data-Type:

Description:

Boolean

This parameter variable type can only be True or False.  When True the value is equal to 1, and it is zero when False.

 

Dialog Example:

Click to Enlarge; Click to Reduce.

Boolean Parameter Setup Example

Boolean Parameter Dialog Example

 

Parameter Menu Example:

Click to Enlarge; Click to Reduce.

Boolean Menu Example

Boolean Parameter Menu Selection Example

 

Script Example:

'  See Dialog Parameter Name

If TrueOrFalse = True Then
  '  When True, Do Stuff Here
Else
  '  When False, Do Stuff Here
EndIf

 

Links:

Constants Reference

See Also:

Data Group and Types

 


Edit Time: 4/15/2018 9:26:34 AM


Topic ID#: 178

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software