From: "James S. Rogers" <jimmaureenrogers@worldnet.att.net>
Subject: Re: parsing a string
Date: 2000/01/15
Date: 2000-01-15T16:09:27+00:00 [thread overview]
Message-ID: <85q63n$ese$1@bgtnsc01.worldnet.att.net> (raw)
In-Reply-To: 388095E5.6BF46237@cstc.org
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
next prev parent reply other threads:[~2000-01-15 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-15 0:00 parsing a string Paolo M. Pumilia
2000-01-15 0:00 ` James S. Rogers [this message]
2000-01-24 0:00 ` pumilia
2000-01-24 0:00 ` Stephen Leake
2000-01-26 0:00 ` CONTRAINT ERROR (was Re: parsing a string) pumilia
2000-01-26 0:00 ` Ian Clifton
2000-01-26 0:00 ` Roger Racine
2000-01-26 0:00 ` Fraser
2000-01-26 0:00 ` Simon Wright
2000-01-26 0:00 ` John English
2000-01-24 0:00 ` parsing a string Ehud Lamm
2000-01-24 0:00 ` pumilia
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox