Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!mis.mcw.edu!tenaglia From: tenaglia@mis.mcw.edu (Chris Tenaglia - 257-8765) Newsgroups: comp.lang.icon Subject: RE: concat with blank and a question Message-ID: <9001191717.AA26075@uwm.edu> Date: 19 Jan 90 16:08:11 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 42 In reply to the concat,... If you are running ICON under unix, and are adventurous, you can build in your own concat with the 'Personal Interpretor' or 'Variant Translator'. I've built a personal code library of icon software chips which I just include using the editor when I use them. Having an operator $ for example may accomplish : both := first $ second (rather then both := first || " " || second) But it still not as flexible as a procedure : procedure cat(s1,s2,s3) /s3 := " " # where an optional string may or may not appear. return s1 || s3 || s2 end --------------------------------------------------- Concerning Character Elimination in a String This is best done with the string scanning feature of ICON. I'll present a little procedure. Others may approach the problem differently. procedure strip(str,chrs) local text,chars /chrs := ' ' chars := &cset -- chrs text := "" str ? while tab(upto(chars)) do text ||:= tab(many(chars)) return text end Yours truly, Chris Tenaglia (System Manager) Medical College of Wisconsin 8701 W. Watertown Plank Rd. Milwaukee, WI 53226 (414)257-8765 tenaglia@mis.mcw.edu