Menu

#358 do "FOR" not honoring DIGITS

open
nobody
None
5
2012-03-19
2012-03-19
No

All versions of REGINA not honoring DIGITS when using the FOR option in a DO loop.

Program:

=============================================
/**/ parse version vers
numeric digits 20
say '---------------------------------------------'
say 'version=' vers
say '---------------------------------------------'
say 'digits=' digits()
say '---------------------------------------------'
say 'digits=' 3**37
say '---------------------------------------------'
say 'length=' length(3**37)
say '---------------------------------------------'

do j=1 for 3**37
if j//10000==1 then say j
end
==============================================

output:

\---------------------------------------------
version= REXX-Regina\_3.6\(MT\) 5.00 31 Dec 2011
\---------------------------------------------
digits= 20
\---------------------------------------------
digits= 450283905890997363
\---------------------------------------------
length= 18
\---------------------------------------------
13 +++ do j=1 for 3\*\*37
Error 26 running "D:\do\_for\_bug.rex", line 13: Invalid whole number
Error 26.3: Value of FOR expression in DO instruction must be zero or a positive
whole number; found "450283905890997363"

___________________________ Gerard Schildberger

Discussion


Log in to post a comment.