[decimal->oncompare] compares the decimal to a required parameter, which may be either a decimal or an integer. Returns -1 if the decimal is less than the parameter, 0 if the decimal is equal to the parameter, or 1 if the decimal is greater than the parameter.
Decimal Value->onCompare(Decimal Value) Decimal Value->onCompare(Integer Value)
Use the [decimal->oncompare] method. The following examples compare a decimal to various numbers and return appropriate results.
local(d) = decimal(1.5) #d->oncompare(1.0) '<br>' #d->oncompare(1.5) '<br>' #d->oncompare(1.9)
1 0 -1
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft