Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

BoolToStr

Convert a boolean value to a string.

Declaration

Source position: sysstrh.inc line 250

function BoolToStr(

  B: Boolean;

  UseBoolStrs: Boolean = False

):string;

function BoolToStr(

  B: Boolean;

  const TrueS: string;

  const FalseS: string

):string;

Description

BoolToStr converts the boolean B to a string representation. Which string this is depends on the way the function is called: You can provide the strings to use for the True or False in the parameters TrueS and FalseS, or you can tell the function to use the first string in the TrueBoolStrs and FalseBoolStrs arrays by setting the UseBoolStrs parameter to True

The default (Delphi compatible) behaviour is to use -1 for True and 0 for False.

Errors

None.

See also

StrToBool

  

Convert a string to a boolean value.

TrueBoolStrs

  

True Strings used in StrToBool conversion.

FalseBoolStrs

  

False Strings used in StrToBool conversion.


Documentation generated on: Oct 02 2024