Initializing help system before first use

gettypeid

Purpose
Get the type ID of a set, list, array or union.
Synopsis
int gettypeid(XPRMcontext ctx, int st, void *ref);
Arguments
ctx 
Mosel's execution context
st 
Structure of the reference ( e.g. XPRM_STRUCT_ARRAY)
ref 
A reference to the entity
Return value
A type ID, 0 if the entity is not a reference to a user type and -1 in case of error (NULL reference of invalid structure).
Example
Considering the following definitions and assuming that ref1 refers to S1 and ref2 refers to S2, the call gettypeid(ctx, XPRM_STR_SET, ref1) will report a positive value (the type ID of myset) while gettypeid(ctx, XPRM_STR_SET, ref2) will return 0 (because this set is not an instance of any user type).
declarations
   myset=set of integer
   S1:myset
   S2:set of integer
end-declarations
Further information
This function can be applied to arrays ( XPRM_STRUCT_ARRAY), sets ( XPRM_STRUCT_SET), lists ( XPRM_STRUCT_LIST) and unions ( XPRM_STRUCT_UNION). It will return a non-zero value only if the corresponding reference is an instance of a user-defined type.

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.