SOM Kernel Reference 1-9
somCompareIds Function
Purpose
Determines whether two SOM IDs represent the same string.
Syntax
int somCompareIds (somId id1, somId id2);
Description
The somCompareIds function returns 1 if the two input IDs represent strings that are equal;
otherwise, it returns 0.
Parameters
id1 The first SOM ID to be compared.
id2 The second SOM ID to be compared.
Return Value
Returns 1 if the two input IDs represent strings that are equal; otherwise, it returns 0.
C Example
#include <som.h>
main()
{
somId id1, id2, id3;
somEnvironmentNew();
id1 = somIdFromString(“this”);
id2 = somIdFromString(“that”);
id3 = somIdFromString(“this”);
SOM_Test(somCompareIds(id1, id3));
SOM_Test(! somCompareIds(id1, id2));
}
Related Information
Functions: somCheckId, somRegisterId, somIdFromString, somStringFromId,
somTotalRegIds, somSetExpectedIds, somUniqueKey, somBeginPersistentIds,
somEndPersistentIds
Data Structures: somId (sombtype.h)
Kommentare zu diesen Handbüchern