Lasso Soft Inc. > Home

[ currency->value ]

Method

The [currency->value] method returns the underlying numeric value of the currency object for use in calculations.

  • Syntax
currency->value
Examples
  • Beginner

Perform calculations using a currency formatted value

This example uses the [currency->value] method to allow a calculation to be performed on an object cast as currency.

Code

var( value = 29.99,
     tax = .13 )

var( price = currency($value) )

'The price is '+$price+'\n' 

var( withTax = $price->value *(1.0 +  $tax) )

'With Tax: '+currency($withTax)

Result

The price is $29.99
With Tax: $33.89

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft