* Constant Record
@ 2018-12-08 15:58 ldries46
2018-12-08 16:14 ` J-P. Rosen
0 siblings, 1 reply; 7+ messages in thread
From: ldries46 @ 2018-12-08 15:58 UTC (permalink / raw)
I have simple record for instance
Type alpha is record
element1 : integer;
element2 : double_float;
end record;
apart from calculating thins with the record I do neen som constants of the
record
that could be:
element1 must be 5
element 2 must de 107.546
and another
element1 must be -2 and the other 547.24
Is it possible to make a constant by
declaring something like
rt : constant alpha :=(5, 107.547) and
xt : constant apha :=( -2, 547.547)
This would be nice
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Constant Record
2018-12-08 15:58 Constant Record ldries46
@ 2018-12-08 16:14 ` J-P. Rosen
2018-12-09 7:20 ` ldries46
0 siblings, 1 reply; 7+ messages in thread
From: J-P. Rosen @ 2018-12-08 16:14 UTC (permalink / raw)
Le 08/12/2018 à 16:58, ldries46 a écrit :
> Is it possible to make a constant by
> declaring something like
> rt : constant alpha :=(5, 107.547) and
> xt : constant apha :=( -2, 547.547)
Why don't you simply try it? Ada people trust their compiler...
Except for
1) double_float should be long_float
2) apha should be alpha
3) missing semicolons
it works!
--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Constant Record
2018-12-08 16:14 ` J-P. Rosen
@ 2018-12-09 7:20 ` ldries46
2018-12-09 8:34 ` Simon Wright
2018-12-09 21:21 ` Simon Wright
0 siblings, 2 replies; 7+ messages in thread
From: ldries46 @ 2018-12-09 7:20 UTC (permalink / raw)
Thanks,
Couldn't find it in Booch. It works.
Concerning the other problems you mentioned. I just made an example
disregarding any syntax errors and not created types
L. Dries
"J-P. Rosen" schreef in bericht news:pugql5$1g7c$1@gioia.aioe.org...
Le 08/12/2018 à 16:58, ldries46 a écrit :
> Is it possible to make a constant by
> declaring something like
> rt : constant alpha :=(5, 107.547) and
> xt : constant apha :=( -2, 547.547)
Why don't you simply try it? Ada people trust their compiler...
Except for
1) double_float should be long_float
2) apha should be alpha
3) missing semicolons
it works!
--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Constant Record
2018-12-09 7:20 ` ldries46
@ 2018-12-09 8:34 ` Simon Wright
2018-12-09 20:51 ` julian.fondren
2018-12-09 21:21 ` Simon Wright
1 sibling, 1 reply; 7+ messages in thread
From: Simon Wright @ 2018-12-09 8:34 UTC (permalink / raw)
"ldries46" <bertus.dries@planet.nl> writes:
> Couldn't find it in Booch. It works.
Booch?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Constant Record
2018-12-09 8:34 ` Simon Wright
@ 2018-12-09 20:51 ` julian.fondren
0 siblings, 0 replies; 7+ messages in thread
From: julian.fondren @ 2018-12-09 20:51 UTC (permalink / raw)
On Sunday, December 9, 2018 at 2:34:41 AM UTC-6, Simon Wright wrote:
> "ldries46" <bertus.dries@planet.nl> writes:
>
> > Couldn't find it in Booch. It works.
>
> Booch?
Some books from the late 80s I'd guess:
Software Engineering With Ada by GRADY BOOCH (1987-05-03)
Object oriented design with applications (Benjamin/Cummings series in Ada and software engineering)
Software Components With Ada: Structures, Tools, and Subsystems (The Benjamin/Cummings Series in Ada and Software Engineering)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Constant Record
2018-12-09 7:20 ` ldries46
2018-12-09 8:34 ` Simon Wright
@ 2018-12-09 21:21 ` Simon Wright
2018-12-10 18:39 ` Dennis Lee Bieber
1 sibling, 1 reply; 7+ messages in thread
From: Simon Wright @ 2018-12-09 21:21 UTC (permalink / raw)
"ldries46" <bertus.dries@planet.nl> writes:
> Couldn't find it in Booch. It works.
Well, the Ada 83 Rationale discusses aggregates ..
http://archive.adaic.com/standards/83rat/html/ratl-03-05.html#3.5
(the current RM is rather opaque on this! but that's why there's a
Rationale. And, new Rationales tend to describe new features of the
corresponding RM release)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Constant Record
2018-12-09 21:21 ` Simon Wright
@ 2018-12-10 18:39 ` Dennis Lee Bieber
0 siblings, 0 replies; 7+ messages in thread
From: Dennis Lee Bieber @ 2018-12-10 18:39 UTC (permalink / raw)
On Sun, 09 Dec 2018 21:21:02 +0000, Simon Wright <simon@pushface.org>
declaimed the following:
>(the current RM is rather opaque on this! but that's why there's a
>Rationale. And, new Rationales tend to describe new features of the
>corresponding RM release)
Which "feature" I discovered after having disposed of older
Rationales...
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-10 18:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-08 15:58 Constant Record ldries46
2018-12-08 16:14 ` J-P. Rosen
2018-12-09 7:20 ` ldries46
2018-12-09 8:34 ` Simon Wright
2018-12-09 20:51 ` julian.fondren
2018-12-09 21:21 ` Simon Wright
2018-12-10 18:39 ` Dennis Lee Bieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox