1. Bug ?

When writing the recursive fill routine (see
previous post) I tested it before adding the
"on-screen" check. Actually I was using a
virtual screen located in a sequence so it was
an "in-sequence" check. I was greeted by the
"attempting to subscript out of bounds" message
endlessly scrolling up the screen. The program
did not terminate in any length of time I was
willing to wait. (it was only a 64x64 sequence)

Don't know if you'd call this a bug, but I
thought I'd let you know.

I was using EU1.5a

Graeme.

new topic     » topic index » view message » categorize

2. Re: Bug ?

Graeme writes:
> When writing the recursive fill routine (see
> previous post) I tested it before adding the
> "on-screen" check. Actually I was using a
> virtual screen located in a sequence so it was
> an "in-sequence" check. I was greeted by the
>   "called from ..."  message
> endlessly scrolling up the screen. The program
> did not terminate in any length of time I was
> willing to wait. (it was only a 64x64 sequence)

Sounds like you had a case of "infinite recursion".

Eventually you'll run out of memory, but before
that happens, you might have hundreds of thousands
or even a million levels of subroutine calls stacked up.

It takes a while for Euphoria to unwind the entire stack, even
though it will stop displaying messages after a
hundred levels and eventually say "skipping 1000000 levels"
or something.

On my Pentium-150 it took an extra 20 seconds after
the messages first appeared before it finally gave me
the DOS prompt.

Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » goto parent     » topic index » view message » categorize

3. Bug ?

Hy,

global function remove_place(sequence s,integer m)
if m=1 then
 s=s[2..length(s)]
elsif m=length(s) then
 s=s[1..length(s)-1]
else
 s = s[1..m-1] & s[m+1..length(s)]
end if
return s
end function

Mister Craig said that in this function there were
not special cases needed, you only needed :

global function remove_place(sequence s,integer m)
 return s = s[1..m-1] & s[m+1..length(s)]
end function

I tried it,
what did I get :
ERROR! slice ends past end of sequence (4 > 3)
etc.

Bug or is R.Craig a lier, or didn't I understand
it right (as always)....

Bye,
PQ
QC

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: Bug ?

Hy,

I am being stupid again...
Sorry...

Bye,
PQ
QC

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu