8 27 6 VarIsBoolean

LANSA Technical

8.27.6 VarIsBoolean

VarIsBoolean Returns a Boolean True if the Subject variant can be converted to a Boolean, otherwise it returns a Boolean False.

VarIsBoolean( Subject )
 

Example

This property routine tests if the variable is a Boolean:

Ptyroutine Name(Set_uSignalSelection)
Define_Map For(*input) Class(*variant) Name(#lcVariant)

If Cond(VarIsBoolean( #lcVariant ) *EQ True)
Execute Subroutine(FP_SETB) With_Parms(#USE_NAME uSignalSelection 1 #USE_OCUR #lclVariant.Boolean)
Else
Execute Subroutine(FP_SET) With_Parms(#USE_NAME uSignalSelection 1 #USE_OCUR #LCLVARIANT.String)
Endif
 

Ý 8.27 Variant Handling