Modula-2 || Compiler & Tools || Library || Search Engine


Ulm's Modula-2 Library:
Keywords


NAME

Keywords - keyword recognition

SYNOPSIS

VAR ok: BOOLEAN;


PROCEDURE DefineKey(string: ARRAY OF CHAR; key: INTEGER); PROCEDURE IsKey(string: ARRAY OF CHAR; VAR key: INTEGER) : BOOLEAN;

DESCRIPTION

DefineKey defines a keyword string and assigns a key value key to it. The key value may be redefined by calling DefineKey with the same string again.

IsKey returns TRUE if string is a keyword previously defined with DefineKey and sets key to the last key value defined for string.

DIAGNOSTIC

Any hash table overflow is indicated by ok = FALSE.

AUTHOR

Werner Stanglow

BUGS

At most 359 keywords with a total string length of about 5.2 KB can be defined.
Edited by: borchert, last change: 1997/02/25, revision: 1.2, converted to HTML: 1997/04/28

Modula-2 || Compiler & Tools || Library || Search Engine