Re: Just some interesting facts

new topic     » goto parent     » topic index » view thread      » older message » newer message

akusaya wrote:
> 
> Try this:
> 
> 
> object a
> a = 0
> for i = 1000000 to 1 by -1 do
>     a = {i, a}
>     a[1] = a
> end for
> print(1,a)
> A message like "A stack overflow was encountered at address 0043d335"
> will appear after about two thousand.

It looks like the stack overflow is coming from the print statement, not the for
loop or sequence creation. I can get it to pass by commenting out or removing the
print statement.

> procedure b(object c) 
>     ?c
>     b(c+1)
> end procedure
> b(0)
> 
> 
> After more than 600000 depth, it still runs!
> 
> 
> So Eu stack is better than C stack. Or Eu doesn't use real stack.
> 
> 


--
"Actually, I'm sitting on my butt staring at a computer screen."
                                                  - Tom Tomorrow

j.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu