From: Stribor40 <ikamzic@gmail.com>
Subject: Re: calling function inside procedure call
Date: Fri, 3 Oct 2014 12:57:55 -0700 (PDT)
Date: 2014-10-03T12:57:55-07:00 [thread overview]
Message-ID: <ddb26343-49d5-4273-bbec-a5885d539e8c@googlegroups.com> (raw)
In-Reply-To: <6887a67e-ca0d-46b1-9c26-be83befd45f3@googlegroups.com>
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
next prev parent reply other threads:[~2014-10-03 19:57 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
2014-10-03 19:57 ` Stribor40 [this message]
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