* pointer to intrinsic function?
@ 2006-03-04 22:07 bantchev
2006-03-05 0:08 ` jimmaureenrogers
2006-03-05 0:42 ` Martin Dowie
0 siblings, 2 replies; 4+ messages in thread
From: bantchev @ 2006-03-04 22:07 UTC (permalink / raw)
Hello all!
Can I get a pointer to an intrinsic function, such as
function "+"(left,right: in float) return float ?
If yes, how? Thank you.
-- B.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pointer to intrinsic function?
2006-03-04 22:07 pointer to intrinsic function? bantchev
@ 2006-03-05 0:08 ` jimmaureenrogers
2006-03-05 0:42 ` Martin Dowie
1 sibling, 0 replies; 4+ messages in thread
From: jimmaureenrogers @ 2006-03-05 0:08 UTC (permalink / raw)
bantchev@math.bas.bg wrote:
> Hello all!
>
> Can I get a pointer to an intrinsic function, such as
> function "+"(left,right: in float) return float ?
> If yes, how? Thank you.
Please explain your goals.
You can pass function parameters to generic units.
You can create an access to function type and assign
it the value of +'access.
I suspect you might not need to do either of these.
Jim Rogers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pointer to intrinsic function?
2006-03-04 22:07 pointer to intrinsic function? bantchev
2006-03-05 0:08 ` jimmaureenrogers
@ 2006-03-05 0:42 ` Martin Dowie
2006-03-05 13:04 ` bantchev
1 sibling, 1 reply; 4+ messages in thread
From: Martin Dowie @ 2006-03-05 0:42 UTC (permalink / raw)
bantchev@math.bas.bg wrote:
> Hello all!
>
> Can I get a pointer to an intrinsic function, such as
> function "+"(left,right: in float) return float ?
> If yes, how? Thank you.
In my experience the answer is "no" [see RM 6.3.1 (11)].
You could wrap you're own inlined function but I'm not even sure what
you would get with that - try it and check the assembler. E.g.
function Add (L, R : Float'Base) return Float'Base;
pragma Inline (Ada);
...
function Add (L, R : Float'Base) return Float'Base is
begin
return L + R;
end Add;
Why are you worried about this?
Cheers
-- Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pointer to intrinsic function?
2006-03-05 0:42 ` Martin Dowie
@ 2006-03-05 13:04 ` bantchev
0 siblings, 0 replies; 4+ messages in thread
From: bantchev @ 2006-03-05 13:04 UTC (permalink / raw)
Jim and Martin:
Thank you both for answering.
Martin Dowie wrote:
> In my experience the answer is "no" [see RM 6.3.1 (11)].
Yes, that seems to be the case. Thank you for pointing me
to this paragraph in the RM.
Jim Rogers wrote:
> Please explain your goals.
Martin Dowie wrote:
> Why are you worried about this?
Since I can do "+"(x,y) in place of x+y (and similarly for other
intrinsics) I thought I could store a pointer to "+" and use it to
the same effect that one would use sin'access etc -- which one
really can. Without that, I have to resort to either wrapping the
intrinsics or doing case analysis -- nothing really awful but still
vexing.
Cheers,
Boyko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-05 13:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-04 22:07 pointer to intrinsic function? bantchev
2006-03-05 0:08 ` jimmaureenrogers
2006-03-05 0:42 ` Martin Dowie
2006-03-05 13:04 ` bantchev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox