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,c5f73eda096e667b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-08 01:16:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: chris.danx@ntlworld.com (Danx) Newsgroups: comp.lang.ada Subject: Re: Neat and tidy solution to following problem? Date: 8 May 2002 01:16:41 -0700 Organization: http://groups.google.com/ Message-ID: References: <8IWB8.2994$0h6.128758@newsfep1-win.server.ntli.net> <3CD87B38.D3DE1CC4@acm.org> NNTP-Posting-Host: 213.107.24.115 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1020845801 4822 127.0.0.1 (8 May 2002 08:16:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 8 May 2002 08:16:41 GMT Xref: archiver1.google.com comp.lang.ada:23703 Date: 2002-05-08T08:16:41+00:00 List-Id: Jeffrey Carter wrote in message news:<3CD87B38.D3DE1CC4@acm.org>... > In Ada every type must be explicitly declared before it can be used. The function would still have a "return type" explicitly given when it's declared so that wouldn't be non-Adaish. The explicitness I was talking about was this type some_record is record the_word : word; remaining : some_string; end record; function get_word (text : in some_string) return some_record; rather than function get_word (text : in some_string) return (word, some_string); it could be defined like this: function get_word (text : in some_string) return (word, some_string) is begin -- do somethis with the string, -- finding w and str. return (w, str); end get_word; and used something like this: ... (a, b) := get_word (temp); ... > There are no exceptions to this rule. So it might be "neat" or "keen" or > even easier to hack in Ada if this weren't the case, but that doesn't > change Ada. It was curiosity, not an attempt to make things easier to "hack". Chris