comp.lang.ada
 help / color / mirror / Atom feed
From: "Antonio Martínez" <amartinez@atc.ugr.es>
Subject: array of strings in a function
Date: Tue, 14 Oct 2003 22:54:54 +0200
Date: 2003-10-14T22:54:54+02:00	[thread overview]
Message-ID: <pan.2003.10.14.20.54.54.17088@atc.ugr.es> (raw)

Hello.

I'm trying to pass to a function an argument. The argument is an
array range <> of Strings (unbounded array).

For example:

my_fun("Hello", ", I'm", " the function");

number of string literals is unknown by the function. And the
length of every string is unknown as well.

It works if I choose a fixed length of the string, and every string
is exactly the length I have forced.

So, if I fixed 4, it works for me:
  my_fun("only", "four", "lette", "rs  ", "are ", "allo", "ed  ");

How do I work with unbound strings?

I want something like this:

  type Miarray is array (Positive range <>) of string;

but it doen't compile !!!


Thank you.

--
Antonio Martï¿œnez, <pascal@eresmas.net>










             reply	other threads:[~2003-10-14 20:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14 20:54 Antonio Martínez [this message]
2003-10-15  2:55 ` array of strings in a function Robert I. Eachus
2003-10-15  3:29   ` Jeff C,
2003-10-15  3:08 ` Jeffrey Carter
2003-10-16  6:40   ` tmoran
2003-10-16  9:31     ` Craig Carey
2003-10-16 18:13       ` Craig Carey
2003-10-16 21:44         ` Marius Amado Alves
2003-10-17 19:48           ` Craig Carey
2003-10-18 10:05             ` Marius Amado Alves
2003-10-18 20:05               ` Craig Carey
2003-10-30  9:42                 ` Craig Carey
2003-10-16 17:58     ` Jeffrey Carter
2003-10-16 20:00       ` tmoran
2003-10-17  0:51         ` Jeffrey Carter
2003-10-15 11:49 ` Antonio Martínez Álvarez
2003-10-15 12:29   ` Preben Randhol
2003-10-15 14:19   ` Ole-Hjalmar Kristensen
2003-10-16 14:30   ` Robert I. Eachus
2003-10-16 17:53     ` Jeffrey Carter
2003-10-17  0:48       ` Robert I. Eachus
2003-10-17 18:41         ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox