Previous Topic

Next Topic

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 c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

Example

See the ChangeSet() example.

See also

ChangeSet(), FreeSet(), FirstInSet(), LastInSet(), PositionSet(), NextInSet(), PreviousInSet()