I plan to open a report of this problem, but I'm having difficulty
deciding on a pithy, meaningful title. Have you any suggestions?
Feel free to point out how I've misinterpreted something and that
this isn't an actual bug. That's happened to me before. I couldn't
find anything in the documentation suggesting this limit. Does it
fail for other people? Does it fail or work on other REXXes?
If you try it, you may see that the error message on 3.9.3 is even
weirder than on older versions. Regardless of level, notice the
difference between DO I = 1 FOR N and DO I = 1 TO N.
<code>
say 'digits() =' digits()
n = 2**31 /* a 10-digit number */
say format(n,,,0) length(n) '(' || n || ')'
do i = 1 for n
say "In first loop for" n
leave i
end
numeric digits 20
say 'digits() =' digits()
n = 2**31 - 1
say format(n,,,0) length(n) '(' || n || ')'
do i = 1 for n
say "In second loop for" n
leave i
end
n = 2**31
say format(n,,,0) length(n) '(' || n || ')'
do i = 1 to n
say "In third loop TO" n
leave i
end
/*
The following yields:
Error 26.3: Value of FOR expression in DO instruction must be zero
or a positive whole number; found "
2147483648"
*/
do i = 1 for n
say "In fourth loop for" n
leave i
end
exit 0
</code>
--
Arthur T. - ar23hur "at" pobox "dot" com