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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,564a91823edb719c X-Google-Attributes: gid103376,public From: pumilia@est.it Subject: Re: parsing a string Date: 2000/01/24 Message-ID: <86h3sd$1fj$1@nnrp1.deja.com>#1/1 X-Deja-AN: 576819840 References: <388095E5.6BF46237@cstc.org> <85q63n$ese$1@bgtnsc01.worldnet.att.net> X-Http-Proxy: 1.0 x29.deja.com:80 (Squid/1.1.22) for client 212.239.48.35 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Jan 24 08:52:33 2000 GMT X-MyDeja-Info: XMYDJUIDpumilia Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (X11; I; Linux 2.2.13 i686) Date: 2000-01-24T00:00:00+00:00 List-Id: In article <85q63n$ese$1@bgtnsc01.worldnet.att.net>, "James S. Rogers" wrote: > Paolo M. Pumilia wrote in message <388095E5.6BF46237@cstc.org>... > >I am rather new to Ada programming. A hint would be useful to quickly > >translate a procedure > >that i am used to use in fortran programs. > >How to split a string (or unbounded string) into a character array, > >using blanks as separators? > > There are a lot of ways to do this. The easiest is to use the package > Ada.Strings.Fixed. For this question you will want to use the > Index function. It will return the index of the first occurance of the > pattern you want to find. > > Simply use string slices after that, repeatedly passing the slices > to the Index function, to parse through the entire original string. > > Jim Rogers > Colorado Springs, Colorado > > Sent via Deja.com http://www.deja.com/ Before you buy.