On Apr 26, 2006, at 7:03 PM, Richard Gaskin wrote:
I got involved a bit yesterday too, and I found myself concentrating on the comments:
put offset("#",tLine) into tOff1 put offset("--",tLine) into tOff2 if tOff1 > 0 or tOff2 > 0 then if tOff1 = 0 then put tOff2 into tOff1 else if tOff2 = 0 then put tOff1 into tOff2 end if put char min(tOff1,tOff2) to -1 of tLine into tComment delete char min(tOff1,tOff2) to -1 of tLine else put empty into tComment end if
Did you know that "//" is a valid comment marker, too? Around 1997, I was grousing to Scott Raney about switching back and forth between C+ + and MetaCard. He snuck the "//" comments in the next update where I discovered it by the usual accident.... no longer an error!
I gave up my comment fiddling - I'm under some project pressure - but I was testing by colorizing my test script, where I found that "--" and "#" in quotes were a real problem. Which of course brings up the whole issue of quoted strings containing keywords....
t -- Tereza Snyder Califex Software, Inc. 800 Water Street Sauk City, WI 53583 608.643.2586 AIM: terezasnyder1 _______________________________________________ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard