SomRegisterId

This function registers a SOM ID and determines whether or not it was previously registered.

Syntax
 somId   id; int     rc;

rc = somRegisterId(id); 

Parameters

 * id (somId) :

Return Code

 * rc (int) :

0  Returns 0 if the ID is already registered. 1  Returns 1 if the ID is not already registered

Remarks
This function registers a SOM ID and converts it into an internal representation. If the ID is already registered, this function returns 0 and has no effect. Otherwise, this function returns 1.

Example Code
 static string s = "unregistered"; static somId sid = &s; main {  somEnvironmentNew; SOM_Test(somRegisterId(sid) == 1); SOM_Test(somRegisterId(somIdFromString("registered")) == 0); } 
 * 1) include 

Data Structures

 * somId (sombtype.h).

Functions

 * somCheckId
 * somIdFromString
 * somStringFromId
 * somCompareIds
 * somTotalRegIds
 * somSetExpectedIds
 * somUniqueKey
 * somBeginPersistentIds
 * somEndPersistentIds