| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== ABS (return absolute value) ====== | [[procedures listed by function.htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[accepted return control just completed .htm|{{btn_next_n.gif|Next page}}]] | | || **ABS(**//expression//**)** {{blk2blue.jpg|blk2blue.jpg}} | **ABS** | Returns absolute value. | | //expression// | A constant, variable, or expression. | The **ABS** procedure returns the absolute value of an //expression//. The absolute value of a number is always positive (or zero). | **Return Data Type:** | REAL or DECIMAL | **Example:** **C = ****ABS****(A - B)              !C is absolute value of the difference** **IF B <; 0** ** B = ABS(B)                 !If b is negative make it positive** **END** **See Also:** [[bcd operations and procedures.htm|BCD Operations and Procedures]]