Initializing help system before first use

# regstring, regstringl

Purpose
Register a text string.
Synopsis
`const char *regstring(XPRMcontext ctx, const char *string);`
`const char *regstringl(XPRMcontext ctx, const char *string, size_t len);`
Arguments

ctx | Mosel's execution context
string | Text string to register. It must be NULL terminated unless its length is provided via the len parameter.
len | Length of the string in bytes (not including the terminating null character)

Return value
Registered text string.
Further information
Mosel requires that each text string is registered. If a native function returns a newly generated string or uses a new string in a Mosel data structure (like a set), this string must be registered with this function before it is used. The returned value is a copy of the string argument (unless the provided parameter was already a registered string). Registered strings remain valid until the end of execution of the model ( i.e. they are never released or moved).
Related topics
setglobal, addelset, addellist, insellist, setarrval, setfieldval.
Parent Topic Miscellaneous

© 2001-2026 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.