Go to the Next or Previous section, the Detailed Contents, or the Amiga E Encyclopedia.


11.1 Built-In Constants

We've already met several built-in constants. Here's the complete list:

TRUE, FALSE
The boolean constants. As numbers, TRUE is -1 and FALSE is zero.

NIL
The bad pointer value. Several functions produce this value for a pointer if an error occurred. As a number, NIL is zero.

ALL
Used with string and list functions to indicate that all the string or list is to be used. As a number, ALL is -1.

GADGETSIZE
The minimum number of bytes required to hold all the data for one gadget. See 11.3.2 Intuition support functions.

OLDFILE, NEWFILE
Used with Open to open an old or new file. See the AmigaDOS Manual for more details.

STRLEN
The length of the last string constant used. Remember that a string constant is something between ' characters, so, for example, the following program prints the string s and then its length:

PROC main()
  DEF s:PTR TO CHAR, len
  s:='12345678'
  len:=STRLEN
  WriteF(s)
  WriteF('\nis \d characters long\n', len)
ENDPROC


Go to the Next or Previous section, the Detailed Contents, or the Amiga E Encyclopedia.