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.43.69.18 with SMTP id ya18mr10997772icb.0.1412366275904; Fri, 03 Oct 2014 12:57:55 -0700 (PDT) X-Received: by 10.183.1.34 with SMTP id bd2mr18275obd.6.1412366275807; Fri, 03 Oct 2014 12:57:55 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h18no1280809igc.0!news-out.google.com!rp1ni13806igb.0!nntp.google.com!uq10no3455243igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 3 Oct 2014 12:57:55 -0700 (PDT) In-Reply-To: <6887a67e-ca0d-46b1-9c26-be83befd45f3@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=130.113.46.8; posting-account=Lb5doAoAAAAWHET3z2_nBVbFSXaZQG1V NNTP-Posting-Host: 130.113.46.8 References: <78448f04-9371-4537-a40a-11bbbfb9b3d8@googlegroups.com> <6887a67e-ca0d-46b1-9c26-be83befd45f3@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: calling function inside procedure call From: Stribor40 Injection-Date: Fri, 03 Oct 2014 19:57:55 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:22054 Date: 2014-10-03T12:57:55-07:00 List-Id: On Friday, 3 October 2014 15:56:14 UTC-4, Adam Beneschan wrote: > On Friday, October 3, 2014 12:50:33 PM UTC-7, Stribor40 wrote: > > > my skeleton code looks something like this..... > > > > > procedure Something > > > > > --some declarations > > > -- > > > -- > > > > > function myFunction (a: in String) return Boolean; > > > > > function myFunction (a: in String) return Boolean is > > > begin > > > Put(a,3); > > > return true; > > > end; > > > > > begin > > > ... > > > .. > > > myFunction("Hello World"); > > > ... > > > .. > > > > > > end Something; > > > > > > i am getting error "cant use function myFunction in a procedure call. > > > > > > How would I make a call to myFunction? > > > > By doing something with the function result. E.g.: > > > > B := myFunction("Hello World"); > > > > where B is a Boolean variable. Ada doesn't let you just call a function and ignore the result. > > > > -- Adam sweet thank you so much