t3x.org / t3x / t3x-manual / 33D.html
 
T3X - A Minimum Procedural Language
Version 8.1.5, Online Edition
Copyright(C) 1996-2004
Nils M Holm
 
Previous:
3.3.12 UPPER
TOC | Index | Back Next:
3.3.14 XDIGIT

3.3.13 VALUE

CHR.VALUE(c) ! Char => Num

Return the value of the digit 'c'. If 'c' is not a (hexa-decimal) digit, return -1. The following values are returned:

'0' -> 0    '4' -> 4    '8' -> 8    'C' -> 12
'1' -> 1    '5' -> 5    '9' -> 9    'D' -> 13
'2' -> 2    '6' -> 6    'A' -> 10   'E' -> 14
'3' -> 3    '7' -> 7    'B' -> 11   'F' -> 15

'a' -> 10   'c' -> 12   'e' -> 14
'b' -> 11   'd' -> 13   'f' -> 15

All other characters are mapped to -1.

See also: XDIGIT

Previous:
3.3.12 UPPER
TOC | Index | Back Next:
3.3.14 XDIGIT