Sign in Join
FPDoc Onlineexperiment

TryFloatToCurr function

In unit sysutils

Try to convert a float value to a currency value and report on success.

Declaration

pascal
function TryFloatToCurr(const Value: Extended; var AResult: Currency)
: Boolean

Description

TryFloatToCurr tries convert the Value floating point value to a Currency value. If successful, the function returns True and the resulting currency value is returned in AResult. It checks whether Value is in the valid range of currencies (determined by MinCurrency and MaxCurrency). If not, False is returned.

Errors

If Value is out of range, False is returned.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.