swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
operator  

abs

 
 

Library: Floating point number support (OMFLOAT)
Import: omfloat.xmd
Library: Binary coded decimal (BCD) numbers (OMBCD)
Import: ombcd.xmd
Return type: BCD or float

Returns: The absolute value of a specified number.


Declaration

export overloaded external float function
   abs value float x

export overloaded external bcd function
   abs value bcd x


Purpose

Use abs to get the absolute value of a floating point number or BCD number.

To get the absolute value of a BCD number, you must import the ombcd.xmd file in your program. To get the absolute value of a floating point number, import the omfloat.xmd file.

BCD Example:

The following program will output "$34.98":

  import "ombcd.xmd" unprefixed
  process
      local bcd price
      set price to -34.98
      output "<$,NNZ.ZZ>" % abs price

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.