home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
cug
/
softt-3.lbr
/
LOOKUP.DQC
/
LOOKUP.DOC
Wrap
Text File
|
1984-07-05
|
2KB
|
93 lines
.de hd
.bp 1
.in 0
.he '$1 (2)'$2'$1 (2)'
.fo ''-#-''
.fi
.in 7
.ti -7
NAME
.br
$1 -
.en
.de sy
.sp 1
.ti -7
SYNOPSIS
.br
.nf
.en
.de fs
.fi
.sp
.ti -7
DESCRIPTION
.br
.en
.de im
.sp
.ti -7
IMPLEMENTATION
.br
.en
.de sa
.sp
.ti -7
SEE ALSO
.br
.en
.de am
.sp
.ti -7
ARGUMENTS MODIFIED
.br
.en
.de ca
.sp
.ti -7
CALLS
.br
.en
.de bu
.sp
.ti -7
BUGS
.br
.en
.hd LOOKUP 03/23/80
retrieve information from a symbol table
.sy
integer function lookup (symbol, info, table)
character symbol (ARB)
integer info (ARB)
pointer table
.fs
'Lookup' examines the symbol table given as its third argument for the
presence of the character-string symbol given as its first argument.
If the symbol is not present, 'lookup' returns 'NO'.
If the symbol is present, the information associated with it is copied
into the information array passed as the second argument to 'lookup',
and 'lookup' returns 'YES'.
.sp
The symbol table used must have been created by the routine 'mktabl'.
The size of the information array must be at least as great as the
symbol table node size, specified at its creation.
.sp
Note that all symbol table routines use dynamic storage space, which
must have been previously initialized by a call to 'dsinit'.
.im
'Lookup' calls 'stlu' to determine the location of the symbol in the
table.
If 'stlu' returns NO, then the symbol is not present, and 'lookup'
returns NO.
Otherwise, 'lookup' copies the information field from the appropriate
node of the symbol table into the information array and returns
YES.
.am
info
.ca
stlu
.sa
enter (2), delete (2), mktabl (2), rmtabl (2), stlu (2),
sctabl (2), dsinit (2), dsget (2), dsfree (2)