System.SysUtils.TrueBoolStrs

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TrueBoolStrs: array of String;

C++

extern DELPHI_PACKAGE System_Sysutils__65 TrueBoolStrs;

Properties

Type Visibility Source Unit Parent
variable public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Lists strings that can represent the Boolean value of True.

TrueBoolStrs is an array of strings that is used in conversions between Boolean values and strings.

When using the BoolToStr function, True values are converted to the first string in the list.

When using the StrToBool function, any string found in the list, regardless of case, is converted to True. If no string match is found, FalseBoolStrs is checked, and False is returned if a match is found. The EConvertError exception is thrown if no matches are found.

Note: The initial length of TrueBoolStrs is 0. Modify the length and then populate the array with strings.

Note: The TrueBoolStrs variable is undefined when an application starts. Any use of StrToBool, BoolToStr, or TryStrToBool will cause this variable to be initialized with the default value of 'True'.

See Also