Documentation for MAX() and MIN() says that "You can specify any number of numbers". The code snippet
do N=1 to 1000 -- if N//256=0 then iterate interpret 'say MAX('copies('1,',N-1)'99)' end
will test MAX() with N arguments and seems to work fine for N up to 255.
Specifying 256 arguments will result in error
"Error 40.3: Not enough arguments in invocation of MAX; minimum expected is 1"
For 257 or more arguments MAX(1,1,1,....,99) give the incorrect result "1"
Also generally, when the number of arguments is an exact multiple of 256, ooRexx will give "Error 40.3"
Anonymous
Erich,
This "bug" is due to the number of args being restricted to a maximum of 255. If you use 256 args, or a multiple of 256, it gets stored as 0 args. Which causes the Error 40.3
When you go past 256 args, only the first 255 are seen, which in your test will all be 1 at that point. Which makes the max 1.
This restriction is meant to be lifted. But doing so introduces an incompatibility in the stored image format when using rexxc. Not something we are going to do for a bug fix release.
This bug will be addressed late.
fixed in 5.0.0