home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
cug
/
softt-12.lbr
/
SETINS.DQC
/
SETINS.DOC
Wrap
Text File
|
1984-07-05
|
1KB
|
51 lines
.he 'SET_INSERT'03/23/80'SET_INSERT'
NAME
.sp
set_insert - place given element in a set
.sp 2
SYNOPSIS
.sp
.nf
subroutine set_insert (element, set)
integer element
pointer set
.sp 2
.fi
DESCRIPTION
.sp
'Set_insert' is the primary means of placing a given element
in a set.
'Element' must be an integer between one and the maximum size
of the set, inclusive;
'set' must be a pointer to a set data structure created by
'set_create'.
If it is within range, the given element is marked "present"
in the bit vector associated with the set.
.sp
All set manipulation routines make use of dynamic storage,
which must be initialized before use.
See 'dsinit' for further information.
.sp
Note that all set manipulation routines have long names.
To avoid unique name conflicts with other routines, any Ratfor
program using the set routines should include the following
statement:
.sp
.ti +5
include "=src=/lcl/lib/swtmlb.u/swtmlb_link.r.i"
.sp 2
IMPLEMENTATION
.sp
If the element is out of range, a call to 'error' is made to
inform the user and terminate the program.
Otherwise, the location of the element in the bit vector is determined
and a few logical operations are employed to set the selected bit.
.sp 2
CALLS
.sp
error
.sp 2
SEE ALSO
.sp
other set routines ('set_?*') (4)