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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-01 07:09:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: "Frank J. Lhota" Newsgroups: comp.lang.ada References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> <20020801140909.I1080@videoproject.kiev.ua> Subject: Re: FAQ and string functions X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: <%hb29.3933$0S2.3139@nwrddc02.gnilink.net> Date: Thu, 01 Aug 2002 14:08:59 GMT NNTP-Posting-Host: 141.157.176.41 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1028210939 141.157.176.41 (Thu, 01 Aug 2002 10:08:59 EDT) NNTP-Posting-Date: Thu, 01 Aug 2002 10:08:59 EDT Xref: archiver1.google.com comp.lang.ada:27568 Date: 2002-08-01T14:08:59+00:00 List-Id: "Oleg Goodyckov" wrote in message news:20020801140909.I1080@videoproject.kiev.ua... > From times of PL/1 I have stable abomination to string processing because > using of SUBSTRING, INDEX etc. is true perversion. It is very hard to > worki with. And enstead of it simple splitting string to list of tokens by > one operator transforms string processing miraculous to usual work. For me > it was very big surprize. I've found this simple trick solves most > problems in most cases. For example, after splitting I have number of > tokens in my string. In many cases it is very important information for > diagnostic purposes and frequently is enough for making decision. Then I > can subsequntly to split every string got on previous splitting and work > independently from other contents of original string. This makes an > algorythms more opaque and simple. The same work using of combinations of > SUBSTRING and INDEX looks awfull. It sounds like you would enjoy using the GNAT.SNOBOL package. Although it comes packaged with the GNAT compiler, the source code is available, and you should be able to compile it with any Ada 95 compiler with little or no modification. This package will allow you to do string processing in the SNOBOL4 style, where indices are almost never used.