4.5 Keywords

Keywords are reserved words that are used to denote special operations or are part of statements. They must not be used as identifiers. The keywords are

and     do       elif   else    end     fi
for     function if     in      local   mod
not     od       or     repeat  return  then
until   while    quit   QUIT    break   rec 

Note that (almost) all keywords are written in lowercase and that they are case sensitive. For example only else is a keyword; Else, eLsE, ELSE and so forth are ordinary identifiers. Keywords must not contain whitespace, for example el if is not the same as elif.

Note: A number of tokens that appear to be normal identifiers representing functions or literals of various kinds are actually implemented as keywords for technical reasons. The only consequence of this is that those identifiers cannot be re-assigned, and do not actually have function objects bound to them, which could be assigned to other variables or passed to functions. These keywords are:

false 	true	IsBound	Unbind	TryNextMethod	
Info	Assert	SaveWorkspace   fail

[Top] [Previous] [Up] [Next] [Index]

GAP 4 manual
February 2000