Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> abs return absolute value pp 139</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ABS                        Return Absolute Value                     pp 139

 Syntax:  Abs (NumVar) ;

 Type:    Real, Integer

 Form:    Function

 Purpose: ABS returns the absolute value of NumVar, as the same type.
          The argument NumVar can be of type REAL or INTEGER.

 ----------------------------------------------------------------------------


 Usage:
       VAR
          NumVar := Abs (NumVar)            ;

       BEGIN
          WriteLn ('Value = ',Abs (NumVar)) ;
       END.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson