From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: calling function inside procedure call
Date: Fri, 3 Oct 2014 12:56:12 -0700 (PDT)
Date: 2014-10-03T12:56:12-07:00 [thread overview]
Message-ID: <6887a67e-ca0d-46b1-9c26-be83befd45f3@googlegroups.com> (raw)
In-Reply-To: <78448f04-9371-4537-a40a-11bbbfb9b3d8@googlegroups.com>
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
next prev parent reply other threads:[~2014-10-03 19:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 19:50 calling function inside procedure call Stribor40
2014-10-03 19:56 ` Adam Beneschan [this message]
2014-10-03 19:57 ` Stribor40
2014-10-03 20:42 ` Marius Amado-Alves
2014-10-04 1:07 ` Stribor40
2014-10-04 3:33 ` Shark8
2014-10-04 4:31 ` Jeffrey Carter
2014-10-04 6:12 ` Shark8
2014-10-04 1:08 ` Stribor40
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox