Gale Paeper wrote:
Thanks for the speedy fix. Without trying the patch yet, I think the other changes might also be needed. When I tried changing the code to a run-time expression evaluation instead of a compile-time constant-expression evaluation to avoid the internal compiler error, I got an error message which in effect said the result of substr((s),1,1) wasn't a ordinal type and therefore the useage of substr((s),1,1) as an argument for the ord function was illegal. Changing it to:
ord(substr((s),1,1)[1])
did make the "not an ordinal type" problem go away. So, those trying to use the macro along with the patch may need to supplement the macro with string array indexing.
This makes me wonder if this should be allowed at all (including parts of the previous change):
: substr(s, i, j) : : From the expression s that shall be of charÂtype or a stringÂtype and from : the expressions i and j that shall be of integerÂtype, this function shall : return a result of the canonicalÂstringÂtype.
: ord(x) : : From the expression x that shall be of an ordinalÂtype, [...]
And the canonicalÂstringÂtype, even values of length 1, is not an ordinalÂtype, AFAIK. I find this:
: Each stringÂtype value is a : value of the canonicalÂstringÂtype.
: NOTE --- 3 CharÂtype values possess properties that allow them to be : used identically to stringÂtype values of length 1. In particular,
but not vice verse.
Am I missing something?
Frank