%NSPC_ADD

Add an entry to a symbol table

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
access_code = %NSPC_ADD(id, entry_name, [data][, access_code])

access_code

The access code for the new entry, or 0 if the entry already exists. (n)

id

The ID of the symbol table. (n)

entry_name

The name of the entry. (a)

data

(optional) The user-defined data to associate with the entry. (a)

access_code

(optional) If passed, move the added item to the position specified within the symbol table. (n)

The %NSPC_ADD function adds an entry to a symbol table.

If an entry named entry_name already exists in the symbol table, the new entry is not added. Entry_name can be up to 255 characters in length.

Data can be up to 100 characters in length, as defined in %NSPC_OPEN.

The access_code argument enables you to request an access code for the entry being added. Passing access_code is equivalent to calling NSPC_ADD without the argument, followed by an NSPC_MOVE with the returned access code as the old_entry argument and the requested access code as the new_entry argument.

The following example adds a username entry to the user_id symbol table.

new_user = %nspc_add(user_id, username, user_data)