From: tmoran@acm.org
Subject: Re: array of strings in a function
Date: Thu, 16 Oct 2003 06:40:26 GMT
Date: 2003-10-16T06:40:26+00:00 [thread overview]
Message-ID: <u3rjb.783826$Ho3.210237@sccrnsc03> (raw)
In-Reply-To: HS2jb.1451$7a4.817@newsread4.news.pas.earthlink.net
> > my_fun("only", "four", "lette", "rs ", "are ", "allo", "ed ");
>
> You can't have a subprogram with an unknown number of parameters, which
> is what you've been trying to write.
But you can certainly have a set of subprograms with the same name
but differing number of parameters:
procedure my_fun(s1 : in string) is ...
procedure my_fun(s1,s2 : in string) is ...
procedure my_fun(s1,s2,s3 : in string) is ...
procedure my_fun(s1,s2,s3,s4 : in string) is ...
or you could use default values
procedure my_fun(s1 : string; -- require at least one parameter
s2 : string := "";
s3 : string := "";
s4 : string := "") is ..
next prev parent reply other threads:[~2003-10-16 6:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-14 20:54 array of strings in a function Antonio Martínez
2003-10-15 2:55 ` Robert I. Eachus
2003-10-15 3:29 ` Jeff C,
2003-10-15 3:08 ` Jeffrey Carter
2003-10-16 6:40 ` tmoran [this message]
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