TOML_GetBool
Returns a boolean value from a loaded TOML document as a LONG (1 = true, 0 = false).
Preferred Clarion class method
Applications using the ProTOML template normally call GetBool.
GetBool PROCEDURE(STRING pKeyPath,BYTE pDefault,*BYTE pValue),LONG
Low-level export contract
| Item |
Value |
| Export |
TOML_GetBool |
| Return type |
LONG |
| Calling convention |
PASCAL, RAW, DLL(1) |
| Binary name |
NAME(‘TOML_GetBool’) |
Parameters
| Parameter |
Type |
Description |
| handle |
LONG |
Positive document handle returned by a document-creation or load export. |
| pKeyPath |
*CSTRING |
TOML dotted or indexed key path. |
| defaultVal |
LONG |
Default scalar returned when the key or element is absent. |
| enableDebug |
LONG |
Nonzero enables debug behavior for this call. |
Return value / error handling
On failure, read TOML_GetLastErrorCode and TOML_GetLastErrorText immediately. The preferred class method converts that pattern into a class result plus retained LastErrorCode and LastErrorText.
Example (Clarion)
AutoSave BYTE
RetCode LONG
CODE
RetCode = Toml.GetBool('application.auto_save',0,AutoSave)
Notes
- This function is available for advanced or specialized integrations.
- Applications using the global template should call GetBool.
- The complete low-level MAP is supplied in Clarion-Classes/ProTOMLRaw.clw.