STAB_GetSize

The STAB_GetSize function returns the number of strings stored in a STAB object.

extern STAB_GetSize
  float handle    // handle to STAB
  floatvar size   // float variable to receive STAB size

Parameters

handle
[in] Handle to a STAB object previously returned from STAB_Create.
size
[out] The number of strings in the table will be returned in this variable.

Remarks

If handle is not a valid STAB handle, an error message will be printed to the console.

Example

The following code fragment demonstrates how to use a loop to retrieve every element in a STAB object.

// Assume @handle is already initialized to
// a STAB object with data in it.

extern STAB_GetSize @handle @size

@i = 0
while (@i < @size)
{
    STAB_GetElem @handle @i @str$
    // Do something useful with the string.
}