Unicode Intrinsic Functions - IsBoolean Method

Test if the string is a Boolean

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)


NameTypeData TypeDescription
Result*Result (Optional)BooleanTrue if the variable is a valid Boolean
FalseCaption*Input (Optional)Unicode StringValue to use for the false value
TrueCaption*Input (Optional)Unicode StringValue to use for the true value


IsBoolean tests a string to determine whether it can be used as a boolean. The TrueCaption and FalseCaption parameters define the allowable values for the Boolean.
IsBoolean will often be used before AsBoolean to trap a potential run time error.
If no input parameters are specified, the function expects values of True or False.


In this example, isBoolean expects a value of N or Y
If (#String.IsBoolean(N Y))
   #Button.Enabled := #String.IsBoolean(N Y)
This is equivalent to writing
Case (#String)
When (= Y)
   #Button.enabled := True
When (= N)
   #Button.enabled := False

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2