docs

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

GetSReal

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

Clarion class declaration

GetSReal PROCEDURE(STRING pKeyPath,SREAL pDefault,*SREAL pValue),LONG

Purpose

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

Parameters

Parameter Type Description
pKeyPath STRING Dotted or indexed TOML key path.
pDefault SREAL Value returned when the TOML key or array element is absent.
pValue *SREAL 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)

TaxRate SREAL
RetCode LONG

CODE
RetCode = Toml.GetSReal('pricing.tax_rate',0.0,TaxRate)

Notes

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