0% found this document useful (0 votes)
6 views

Keywords

Keywords are reserved words that have special meaning in programming languages and cannot be used as variable or function names. This document lists keywords in the GAP programming language including logical and flow control keywords like if, else, for as well as reserved words like true, false, and that must be lowercase and case sensitive. It notes some tokens like functions that are implemented as keywords for technical reasons.

Uploaded by

ravg10
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Keywords

Keywords are reserved words that have special meaning in programming languages and cannot be used as variable or function names. This document lists keywords in the GAP programming language including logical and flow control keywords like if, else, for as well as reserved words like true, false, and that must be lowercase and case sensitive. It notes some tokens like functions that are implemented as keywords for technical reasons.

Uploaded by

ravg10
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Keywords

By: GAP

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
continue

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

Reference: http://www.gap-system.org/Manuals//doc/htm/ref/CHAP004.htm#SECT005
Date:17-9-2008

You might also like