[Aldor-l] {Spam?} bug with iterate

Ralf Hemmecke ralf at hemmecke.de
Thu Jul 10 00:29:55 EDT 2008


Hello,

that looks like a bug to me.

By mistake I've put an 'iterate' not in a 'repeat' body.
I think the compiler should reject that program instead of compiling it 
and then looping forever when I running the program.

Ralf

aldor -fx -laldor bugIterate.as
bugIterate
foo0 = 1
foo1 = 1
foo0 = 2
-- program doesn't stop


---BEGIN bugIterate.as
#include "aldor"
#include "aldorio"
import from Integer;
foo(i: Integer): () == {
	stdout << "foo0 = " << i << newline;
	if even? i then iterate;
	stdout << "foo1 = " << i << newline;
}
main(): () == for i in 1..5 repeat foo(i);
main();
---END bugIterate.as




More information about the Aldor-l mailing list