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.42.250.206 with SMTP id mp14mr7724510icb.23.1412366173544; Fri, 03 Oct 2014 12:56:13 -0700 (PDT) X-Received: by 10.50.114.101 with SMTP id jf5mr10284igb.4.1412366173447; Fri, 03 Oct 2014 12:56:13 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!h18no1280188igc.0!news-out.google.com!rp1ni13806igb.0!nntp.google.com!uq10no3454310igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 3 Oct 2014 12:56:12 -0700 (PDT) In-Reply-To: <78448f04-9371-4537-a40a-11bbbfb9b3d8@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <78448f04-9371-4537-a40a-11bbbfb9b3d8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6887a67e-ca0d-46b1-9c26-be83befd45f3@googlegroups.com> Subject: Re: calling function inside procedure call From: Adam Beneschan Injection-Date: Fri, 03 Oct 2014 19:56:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:189357 Date: 2014-10-03T12:56:12-07:00 List-Id: 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