* Apex problem w/aliased variables
@ 1996-11-13 0:00 paul williams
1996-11-18 0:00 ` problemes mathematiques koniez tayeb
0 siblings, 1 reply; 7+ messages in thread
From: paul williams @ 1996-11-13 0:00 UTC (permalink / raw)
We are developing a large scientific application using Ada95
with the Rational Apex tool. Our design depends heavily on being
able to take advantage of the new access mechanism for
non-allocated variables. However, the Apex analyzer reports an
error when attempting to assign the access attribute of an
aliased variable to a pointer that is appropriately declared for
the entire class. See code sample followed by error report
below. Is anyone else using Apex and having this problem? If so,
have you determined a suitable workaround? I'm told that
Rational knows about the problem but has no patches. Any
suggestions?
package Test is
type Object is tagged record
Component : Integer;
end record;
type Object_Ptr is access all Object'Class;
type My_Object is new Object with null record;
The_Object : aliased My_Object;
The_Ptr : Object_Ptr := The_Object'Access;
end Test;
16:35:46 >>> THE_PTR : OBJECT_PTR := THE_OBJECT'ACCESS;
16:35:46 *** THE_OBJECT is not a value of OBJECT'CLASS
Thanks in advance for any assistance.
Regards,
Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* problemes mathematiques
1996-11-13 0:00 Apex problem w/aliased variables paul williams
@ 1996-11-18 0:00 ` koniez tayeb
1996-11-18 0:00 ` Laurent Guerby
[not found] ` <01bbd5f1$b994c530$262a6282@cln49ae>
0 siblings, 2 replies; 7+ messages in thread
From: koniez tayeb @ 1996-11-18 0:00 UTC (permalink / raw)
Salut,
J'aimerai savoir comment on obtient
sous ada95 les op�rateurs suivants :
- racine carr�e.
- racine n i�me.
- sin, cos, arc-cos et autres fonctions
trigonom�triques.
Si vous avez une documentation �lectronique
sur ce sujet cela m'int�resserai au plus haut
point.
Mille merci d'avance .
A+
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problemes mathematiques
1996-11-18 0:00 ` problemes mathematiques koniez tayeb
@ 1996-11-18 0:00 ` Laurent Guerby
[not found] ` <01bbd5f1$b994c530$262a6282@cln49ae>
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Guerby @ 1996-11-18 0:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
[Note: there's currently a CFV for fr.comp.lang.ada]
> J'aimerai savoir comment on obtient sous ada95 les op�rateurs
> suivants :
with Ada.Numeric.Elementary_Functions; use Ada.Numeric.Elementary_Functions;
> - racine carr�e.
Sqrt (X)
> - racine n i�me.
~= Exp (Log (X) / N)
> sin, cos, arc-cos et autres fonctions trigonom�triques.
Sin, Cos, Arccos, ...
> Si vous avez une documentation �lectronique sur ce sujet cela
> m'int�resserai au plus haut point.
URLs: http://www.adahome.com/rm95/rm9x-A-05.html
http://www.adahome.com/rm95/rm9x-G.html
http://www.adahome.com/LRM/95/Rationale/rat95html/rat95-p3-a.html#3
http://www.adahome.com/LRM/95/Rationale/rat95html/rat95-p3-g.html
--
Laurent Guerby <guerby@gnat.com>, Team Ada.
"Use the Source, Luke. The Source will be with you, always (GPL)."
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <01bbd5f1$b994c530$262a6282@cln49ae>]
* Re: problemes mathematiques
[not found] ` <01bbd5f1$b994c530$262a6282@cln49ae>
@ 1996-11-21 0:00 ` Keith Thompson
1996-11-21 0:00 ` Samuel Tardieu
0 siblings, 1 reply; 7+ messages in thread
From: Keith Thompson @ 1996-11-21 0:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
In <01bbd5f1$b994c530$262a6282@cln49ae> "Pascal Obry" <pascal.obry@der.edfgdf.fr> writes:
[...]
> Ce ne sont pas des op�rateurs mais des fonctions que tu trouveras dans le
> package Ada.Numerics.Elementary_Functions.
>
> racine carr�e x : Sqrt (x)
> racine n i�me : Sqrt (x) / Sqrt (n)
I presume "racine n i�me" is "nth root" (cube root, fourth root, etc.).
The formula given above, Sqrt (x) / Sqrt (n), is incorrect. The correct
formula is x ** 1.0/n (you'll have convert n to the appropriate
floating-point type first).
--
Keith Thompson (The_Other_Keith) kst@thomsoft.com <*>
TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
FIJAGDWOL
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problemes mathematiques
1996-11-21 0:00 ` Keith Thompson
@ 1996-11-21 0:00 ` Samuel Tardieu
1996-11-22 0:00 ` Keith Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Tardieu @ 1996-11-21 0:00 UTC (permalink / raw)
To: Keith Thompson
>>>>> "Keith" == Keith Thompson <kst@thomsoft.com> writes:
Keith> I presume "racine n i�me" is "nth root" (cube root, fourth
Keith> root, etc.). The formula given above, Sqrt (x) / Sqrt (n), is
Keith> incorrect. The correct formula is x ** 1.0/n (you'll have
Keith> convert n to the appropriate floating-point type first).
I presume you mean x ** (1.0/n) ? (I thought first that it was a
mathematical formula rather than an Ada expression, but your comment
about n being converted to the appropriate floating-point type makes me
think differently :-)
Sam
--
Samuel Tardieu -- sam@ada.eu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problemes mathematiques
1996-11-21 0:00 ` Samuel Tardieu
@ 1996-11-22 0:00 ` Keith Thompson
1996-11-22 0:00 ` lecomteg
0 siblings, 1 reply; 7+ messages in thread
From: Keith Thompson @ 1996-11-22 0:00 UTC (permalink / raw)
In <qw67mnfd6ls.fsf@esmeralda.enst.fr> Samuel Tardieu <sam@ada.eu.org> writes:
> >>>>> "Keith" == Keith Thompson <kst@thomsoft.com> writes:
> Keith> The correct formula is x ** 1.0/n (you'll have to
> Keith> convert n to the appropriate floating-point type first).
>
> I presume you mean x ** (1.0/n) ?
Actually, I was using spacing to indicate the association of the operands.
Oh, you mean your compiler doesn't implement this extension?
(Ok, ok, I forgot the parentheses.)
--
Keith Thompson (The_Other_Keith) kst@aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
"SPOON!" -- The Tick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problemes mathematiques
1996-11-22 0:00 ` Keith Thompson
@ 1996-11-22 0:00 ` lecomteg
0 siblings, 0 replies; 7+ messages in thread
From: lecomteg @ 1996-11-22 0:00 UTC (permalink / raw)
I'm not sure the parentheses are needed. I think I remember the priority
of
** was a little silly (or did I dream it?).
A propos, the LRM is defenitely *not* the best book on Ada (just a bunch
of
legalese). Did THEY really intend it to be read (and understood) ?
Well, I recognise that having one handy would have helped me
being sure about that ** vs / priority... ;-)
G Lecomte
<<<Strong typing is for people with weak memories>>>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1996-11-22 0:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-13 0:00 Apex problem w/aliased variables paul williams
1996-11-18 0:00 ` problemes mathematiques koniez tayeb
1996-11-18 0:00 ` Laurent Guerby
[not found] ` <01bbd5f1$b994c530$262a6282@cln49ae>
1996-11-21 0:00 ` Keith Thompson
1996-11-21 0:00 ` Samuel Tardieu
1996-11-22 0:00 ` Keith Thompson
1996-11-22 0:00 ` lecomteg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox