docs

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

GetReal

Reads a floating-point TOML value into a Clarion REAL with a supplied default.

Clarion class declaration

GetReal PROCEDURE(STRING pKeyPath,REAL pDefault,*REAL pValue),LONG

Purpose

Reads a floating-point TOML value into a Clarion REAL with a supplied default.

Parameters

Parameter Type Description
pKeyPath STRING Dotted or indexed TOML key path.
pDefault REAL Value returned when the TOML key or array element is absent.
pValue *REAL Output variable that receives the requested value.

Return value

Returns ProTOML:OK on success or a negative ProTOML error code. Call GetLastError for readable details.

Example (Clarion)

CreditLimit REAL
RetCode     LONG

CODE
RetCode = Toml.GetReal('customer.credit_limit',0.0,CreditLimit)

Notes

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