From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,32178b9acf403f40 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-24 13:18:53 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!fr.clara.net!heighliner.fr.clara.net!newsfeed.hanau.net!newsfeed01.sul.t-online.de!t-online.de!blackbush.xlink.net!connemara.xlink.net!news.erfurt.thur.de!eastside.erfurt.thur.de!drcomp.erfurt.thur.de!not-for-mail From: Adrian Knoth Newsgroups: comp.lang.ada Subject: Re: Regex and/or LaTeX Date: 24 Feb 2001 15:36:34 GMT Organization: Modern Electronics Message-ID: <978ke2$4pi$2@drcomp.erfurt.thur.de> References: <972rhk$a13$1@drcomp.erfurt.thur.de> <1sFl6.2330$mX4.169381@bgtnsc06-news.ops.worldnet.att.net> NNTP-Posting-Host: drcomp.erfurt.thur.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Server-Date: 24 Feb 2001 15:36:34 GMT User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.4.2 (i586)) Xref: supernews.google.com comp.lang.ada:5516 Date: 2001-02-24T15:36:34+00:00 List-Id: Rajagopalan Srinivasan wrote: > gnat.regexp Yeah, thank you, that's fine. I guess I'll use it in some projects. Actually I don't want to limit my program to a special compiler, so I implemented the desired functionality in this way: procedure texstring (ausdruck : in out ustring) is tmp : string := To_string(ausdruck); hs : ustring := To_Ustring(""); begin ausdruck := To_ustring(""); for I in tmp'range loop case tmp(I) is when '&' => hs := To_Ustring("\&"); when '%' => hs := To_Ustring("\%"); when others => hs := To_Ustring(tmp(I) & ""); end case; ausdruck := ausdruck & hs; end loop; end texstring; Perhaps I need to extend this for other LaTeX-symbols. For now, it works well. -- mail: adi@thur.de http://adi.thur.de PGP: v2-key via keyserver Alle schimpfen �ber den Bundeskanzler. Dabei tut er doch gar nichts.