docs

Home Getting Started Browse by Category Class Methods Low-Level API

TOML_KeyExists

Returns 1 if a key exists at the specified path in a loaded TOML document, 0 if not.

Preferred Clarion class method

Applications using the ProTOML template normally call KeyExists.

KeyExists PROCEDURE(STRING pKeyPath,*BYTE pExists),LONG

Low-level export contract

Item Value
Export TOML_KeyExists
Return type LONG
Calling convention PASCAL, RAW, DLL(1)
Binary name NAME(‘TOML_KeyExists’)

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.
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)

Exists  BYTE
RetCode LONG

CODE
RetCode = Toml.KeyExists('application.name',Exists)

Notes

Home Getting Started Browse by Category Class Methods Low-Level API