Name
abs -- return the absolute value
Purpose
Compute the absolute value of an expression
Usage
abs x
Arguments
x = value or expression to be evaluated
Output
Prints the absolute value of x on the terminal
Exit values
0 = normal completion
Example
1) Compute absolute value of a simple value:
abs -1.2345 # returns "1.2345"
2) Compute absolute value of an expression using Cshell variables:
set a = -1.2345
set b = 10
abs $a + $b # returns "8.7655"
abs "$a * $b" # returns "12.345"
See Also
The shell script abs
DEIMOS script index
Go to:
DEIMOS Home Page -
Instruments Home Page -
Keck Home Page
Last modified: Wed Jun 9 16:30:32 2004