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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.240.4 with SMTP id vw4mr11624932pac.10.1391356842276; Sun, 02 Feb 2014 08:00:42 -0800 (PST) X-Received: by 10.140.37.18 with SMTP id q18mr2957qgq.20.1391356842213; Sun, 02 Feb 2014 08:00:42 -0800 (PST) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!c10no8774246igq.0!news-out.google.com!y18ni189qap.1!nntp.google.com!k15no11622782qaq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 2 Feb 2014 08:00:42 -0800 (PST) In-Reply-To: <2rmse99q9qtgb9g7edoavse53p74f4p0ak@4ax.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:120b:2c65:d7b0:6d18:a9bc:72ea:83f7; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:120b:2c65:d7b0:6d18:a9bc:72ea:83f7 References: <2rmse99q9qtgb9g7edoavse53p74f4p0ak@4ax.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <469a2f11-ce62-4651-ba3e-00fb433449e8@googlegroups.com> Subject: Re: need help learning Ada for a modula-2 programmer From: gautier_niouzes@hotmail.com Injection-Date: Sun, 02 Feb 2014 16:00:42 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Original-Bytes: 1976 Xref: number.nntp.dca.giganews.com comp.lang.ada:184634 Date: 2014-02-02T08:00:42-08:00 List-Id: > Is it correct that having a function return a fixed string is more > flexible than a string param in a procedure? I am getting the sense > that having a function return the string on the stack works by not > setting its dimensions in advance, but a param has to set them in > advance. So the trick is to use the stack for strings by recursion, > as you just did? You perfectly got the advantage of using a function for obtaining a String (or any unconstrained type) whose length (or range(s) or parameters) is not known in advance. _________________________ Gautier's Ada programming http://sf.net/users/gdemont