abs
From the SETL Wiki
| abs | |
|---|---|
| Category | math |
| Syntax | prefix |
| Compatibility | |
| CIMS SETL | yes |
| SETL-S | yes |
| SETL2 | yes |
| GNU SETL | yes |
Contents |
Purpose
Absolute value of number, character code
Synopsis
abs x
Description
- If x is an integer or real number, returns its absolute value.
- If x is a string, returns the numeric code of the initial character.
Examples
-
abs 1
Result: 1
-
abs -42
Result: 1
-
abs 'a'
Result: 65
Notes
- All implementations currently use ASCII or ISO-8859-1 as the default (and only) character encoding.

