FairCom Corporation


F.8 AllocateSet


Optionally allocates buffer space for multiple sets.

SHORT NAME

ALCSET

TYPE

ISAM function

DECLARATION

COUNT AllocateSet(COUNT numset)

DESCRIPTION

AllocateSet is called internally by ChangeSet and is an optional part of the API.

AllocateSet allocates key buffers for multiple, simultaneous sets. Ordinarily, the c-tree Plus sequence set functions, FirstInSet, NextInSet, etc., are used for only one set at a time. Each call to ChangeSet with a unique value allocates a new set maintained by c-tree Plus. Calling AllocateSet is optional, as ChangeSet automatically calls AllocateSet when necessary.

Prior to c-tree Plus V6.4B, the numset parameter was a unique set identification number. numset is ignored by c-tree Plus V6.4B and after.

See ChangeSet for more information

RETURN

Value
Symbolic Constant
Explanation
0
NO_ERROR
Successful allocation.
184
ISDP_ERR
AllocateSet already called for this set. Call FreeSet if you must recall AllocateSet.
185
ISAL_ERR
No memory available for set buffers.

See Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.

EXAMPLE

See the ChangeSet example.

SEE ALSO

ChangeSet, FreeSet, FirstInSet, LastInSet, PositionSet, NextInSet, and PreviousInSet.


FairCom Corporation
www.faircom.com