FSS
12-18-2002, 05:11 AM
By accident I found the following (Major?) bug in AcuCobol:
Let make a quiz out of it (hope you're in for a little joke) ;)
* what does the following code display, and does it ever end?
--- cut here ---------------------------
identification division.
program-id. bugtest.
author. Frans Smits Software B.V. (Leon Arnst).
procedure division.
main section.
perform until 5 < 1
display 5
subtract 1 from 5
end-perform.
exit program.
stop run.
--- cut here ----------------------------
Sounds funny, but the answer is:
Yes, it ends after displaying
5
4
3
2
1
:)
Let make a quiz out of it (hope you're in for a little joke) ;)
* what does the following code display, and does it ever end?
--- cut here ---------------------------
identification division.
program-id. bugtest.
author. Frans Smits Software B.V. (Leon Arnst).
procedure division.
main section.
perform until 5 < 1
display 5
subtract 1 from 5
end-perform.
exit program.
stop run.
--- cut here ----------------------------
Sounds funny, but the answer is:
Yes, it ends after displaying
5
4
3
2
1
:)