Re: typecasts again
- Posted by Derek Parnell <ddparnell at bigpond.com> Jan 10, 2003
- 456 views
> > Kat wrote: > > > This line: > > > > > > while sequence(TheWebPage[junk][1]) and match(" ",TheWebPage[junk][1]) > > > do > > > > > > errors out with : > > > > > > attempt to subscript an atom > > > (reading from it) > > > > > > Since TheWebPage[junk] is a sequence, > > > TheWebPage[junk][1] is a sequence, where is it an atom?? > > > > > > Kat > > Kat, what do you get if you code it this way instead... while 1 do if not sequence(TheWebPage[junk][1]) then puts(1, "Not a sequence\n") exit end if if not match(" ",TheWebPage[junk][1]) then exit end if . . . end while However, I take it that 'TheWebPage[junk]' is supposed to contain a line of text. If that is so, then I would expect that 'TheWebPage[junk][1]' would contain an atom - namely the first character in the line. ---------------- cheers, Derek Parnell