Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi everyone
Does anyone know if the setting of using ORIGIN in string indexing is stored in any variable? A work around would be to use one of the string functions and check what it returns.
Solved! Go to Solution.
Here is a way to determine the index value used for the first character in a string.
It returns 0 if the option "ORIGIN in strings" is NOT checked and the value of ORIGIN otherwise.
The variable that ORIGIN is stored in is ORIGIN. You can use ORIGIN as an index value, etc. as in this example:
Here is a way to determine the index value used for the first character in a string.
It returns 0 if the option "ORIGIN in strings" is NOT checked and the value of ORIGIN otherwise.
Here's an expression that determines the ORIGIN used in strings, and it works in Prime Express:
With 'ORIGIN in strings' set it produces the value of ORIGIN,
otherwise it produces 0, regardless of the value of ORIGIN
Note that you cannot determine the setting of 'ORIGIN in strings' in all cases by comparing ORIGIN with ORIGIN.string.
If ORIGIN=0, it may be set, or not.
Success!
Luc
Hi all
Thanks for all the replies. Werner's solution works, great!