swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Related Concepts  
operator  

abs

 

 

Return type: OMX
Returns:       

The absolute value of a specified number.



Syntax
  abs bcd expression

  OR

  abs floating point expression


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 Concepts
   BCD data type
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:44:56 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.