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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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 09:05:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!newshub1.nl.home.com!news.nl.home.com!amsnews01.chello.com!trev!newsfeed.simtel.ru!Simtel.RU!image.surnet.ru!surnet.ru!carrier.kiev.ua!news.lucky.net!not-for-mail From: Oleg Goodyckov Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: Thu, 1 Aug 2002 19:05:34 +0300 Organization: unknown Distribution: world Message-ID: <20020801190534.P1080@videoproject.kiev.ua> References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> <20020801140909.I1080@videoproject.kiev.ua> <%hb29.3933$0S2.3139@nwrddc02.gnilink.net> Reply-To: og@videoproject.kiev.ua NNTP-Posting-Host: news.lucky.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.lucky.net 1028217896 540 193.193.193.102 (1 Aug 2002 16:04:56 GMT) X-Complaints-To: usenet@news.lucky.net NNTP-Posting-Date: Thu, 1 Aug 2002 16:04:56 +0000 (UTC) Keywords: 265282490 X-Return-Path: oleg@videoproject.kiev.ua Xref: archiver1.google.com comp.lang.ada:27577 Date: 2002-08-01T19:05:34+03:00 List-Id: On Thu, Aug 01, 2002 at 02:08:59PM +0000, Frank J. Lhota wrote: > "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. Spitbool and Spitbool.Pattern. But only second has procedure, which can not only find substring matched pettern but refer me to it's position too. But this is too few. It is impossible to split string by delimiters in one operation. Or possible?