[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

TryFloatToCurr

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

Declaration

Source position: sysstrh.inc line 155

function TryFloatToCurr(

  const Value: Extended;

  var AResult: Currency

):Boolean;

Description

TryFloatToCurrtries convert the Valuefloating point value to a Currencyvalue. If successful, the function returns Trueand the resulting currency value is returned in AResult. It checks whether Valueis in the valid range of currencies (determined by MinCurrencyand MaxCurrency). If not, Falseis returned.

Errors

If Valueis out of range, Falseis returned.

See also

FloatToCurr

  

Convert a float to a Currency value.

MinCurrency

  

Minimum Currency value

MaxCurrency

  

Maximum currency value