loopy loop execution

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

This has happened several times now, and i don't know why. I have
a while loop, and the only way out of it is thru these three exits:



if match("GIF87",upperTheWebPage) then
         TheRadarPic = TheWebPage
         exit
       end if
       if match("GIF89",upperTheWebPage) then
         TheRadarPic = TheWebPage
         exit
       end if
       if match("JFIF",upperTheWebPage) and match("=FF=D9<!--- eof ---
>",TheWebPage) then
         TheRadarPic = TheWebPage
         exit
       end if

Now along comes a file (TheWebPage) containing ONLY :
<!--- EOF --->

and the program exits the while loop, and where TheWebPage was
pronounced to be 16 chars long by this line:

puts(1,sprintf("%d",length(TheWebPage))&" -- ")

TheRadarPic is now 0 bytes long, said by this line:

puts(1,sprintf("%d",length(TheRadarPic))&"\n")

So my questions are, how is it getting out of the while loop?, and
how is the length being changed? This is an intermittant problem, it
doesn't always do this, it's like a once-a-day thing.

Kat,
forgot to have with trace,
but has it on now.....

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

Search



Quick Links

User menu

Not signed in.

Misc Menu