Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!GARGOYLE.UCHICAGO.EDU!goer%sophist From: goer%sophist@GARGOYLE.UCHICAGO.EDU (Richard Goerwitz) Newsgroups: comp.lang.icon Subject: line splits & uncommenting Message-ID: <9009272155.AA11909@sophist> Date: 27 Sep 90 21:55:09 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 31 Has anybody thought about the pathological split line literal? tmp := [] while find("\"567_ #934.\355\\\'",read()) do # Unbelievable isn't it put(tmp,"Field_1_ _78\'#\\\"YYY_ Continuing_String_ Literally_Pathetic#") # \\ "ack!" #\\ I confess that I hadn't thought about the split-line literal. I don't use them myself, and generally don't like the look of code that does. That's no excuse, though. BTW, do you have a solution in mind? We know that the underscore has to be the last thing on the line, except for whitespace and comments. I'll bet it would be possible to modify the procedures posted so that they look, not only for " and ' and \, but also _. If the underscore is encountered, then you could tab past any spaces and newlines (if present), and if either pos(0) or match("#") succeed, then abort all attempts at ' and "-matching, and return &subject[1:&pos]. Just an off-the-cuff guess. If anyone cleans up our collective postings and makes the _ thing work, could he or she please re-post the resulting procedure? -Richard /