booltostr


The booltostr function returns "true" or "false" corresponding to a boolean value which can be take the value true or false. This is useful when printing a boolean value which otherwise would print as 1 or 0.

Syntax

str = booltostr( boolean_value )

bullet.gif    boolean_value is boolean value.

bullet.gif    str is the string name "true" or "false".

Example

The following script prints the boolean status returned by a class method. Assume the values sPath and sAccess are known.

F = new_filedlg()

-- create a CFileDlg object

sName, bOk = F:Open( sPath, sAccess )

-- open a file, get name and status

Printf("File status: %d\n", bOK)

-- prints 0 or 1 for bOK

Printf("File status: %s\n", booltostr(bOK))

-- prints "true" or "false" for bOK

Related Topics

Contents

Miscellaneous Functions


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.