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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9fa5063fbdc75ae4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-15 23:40:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-server.caltech.edu!attla2!ip.att.net!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: array of strings in a function References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.124.41 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc03 1066286426 12.234.124.41 (Thu, 16 Oct 2003 06:40:26 GMT) NNTP-Posting-Date: Thu, 16 Oct 2003 06:40:26 GMT Organization: Comcast Online Date: Thu, 16 Oct 2003 06:40:26 GMT Xref: archiver1.google.com comp.lang.ada:946 Date: 2003-10-16T06:40:26+00:00 List-Id: > > 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 ..