Next: Floating-point Numbers
Up: Terms
Previous: Terms
  Contents
  Index
The printed form of an integer in HiLog consists of a sequence of digits
optionally preceded by a minus sign ('-'). These are normally
interpreted as base 10 integers. It is also possible to enter integers
in other bases (2 through 36); this can be done by preceding the digit
string by the base (in decimal) followed by an apostrophe ('). If a
base greater than 10 is used, the characters A-Z or a-z are
used to stand for digits greater than 9.
Using these rules, examples of valid integer representations in XSB are:
1 -3456 95359 9'888 16'1FA4 -12'A0 20'
representing respectively the following integers in decimal base:
1 -3456 95359 728 8100 -120 0
Note that the following:
+525 12'2CF4 37'12 20'-23
are not valid integers of XSB.
A base of 0 (zero) will return the ASCII code of the (single) character
after the apostrophe; for example,
0'A = 65
Luis Fernando P. de Castro
2003-06-27