%NSPC_OPEN
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
id = %NSPC_OPEN([flags], [size], {reserved}, {reserved}, [begin_count][, expand_count])
Return value
id
An identifier for the symbol table created. (n)
Arguments
flags
(optional) One of the following control flags defined in namspc.def or the sum of D_NSPC_CASE and D_NSPC_SPACE: (n)
D_NSPC_NONE = No flags specified (default)
D_NSPC_CASE = Case significant
D_NSPC_SPACE = Leading and trailing spaces significant
size
(optional) The size of the user data to be associated with each entry. (The maximum is 100.) (n)
{reserved}
A reserved placeholder for internal use. If passed, the value must be 0.
begin_count
(optional) The initial number of entries to allocate. (n)
expand_count
(optional) The number of entries by which to expand when required. (n)
Discussion
The %NSPC_OPEN function creates a symbol table object.
If flags contains D_NSPC_CASE, the case of any letters in the entry names is significant. If flags contains D_NSPC_SPACE, leading and trailing spaces in the entry names are significant. D_NSPC_NONE is defined for convenience and should be used if neither of the above flags are used.
Size can be a maximum of 100 bytes. If size is not specified, it defaults to 4 bytes.
Space is initially allocated for begin_count number of entries. Whenever the allocations for the symbol table are depleted, an additional expand_count number of entries are allocated, using the same arguments.
If length is not specified, it defaults to 10 bytes. If begin_count or expand_count are not specified, each defaults to 32 entries.
Examples
The following example creates a symbol table for the username, with each entry large enough to contain user_data.
user_id = %nspc_open(, ^size(user_data))