From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Syntax Question
Date: Thu, 5 Jul 2001 14:32:53 -0400
Date: 2001-07-05T18:32:55+00:00 [thread overview]
Message-ID: <9i2bsn$929$1@nh.pace.co.uk> (raw)
In-Reply-To: 3B44AAE3.DB048BC8@ll.mit.edu
First off, let me advise you of this: YOU'RE GOING THE WRONG WAY!!! :-)
Why you want to go from Ada (note character case) to C, I do not know, but
it is *definitely* a step backward.
The code you refer to is a case where "some_var" is of a tagged record type
("some_type"). The tagged record type is itself derived from another type in
which it extends the original type with two new fields: attr_x and attr_y.
What you have in the assignment statement is an "aggregate" which is a sort
of literal. It specifies data values to be assigned to some_var that include
values for the extended record fields.
There is no equivalent to this in C.
MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas www.pacemicro.com
Enabling the digital revolution
e-Mail: marin.condic@pacemicro.com
Web: http://www.mcondic.com/
"Robby Simpson" <rsimpson@ll.mit.edu> wrote in message
news:3B44AAE3.DB048BC8@ll.mit.edu...
> I have some ADA code I am porting to C (I am new to ADA). What would
> the following code mean?
>
> some_var : some_type;
>
> some_var := (some_other_type with attr_x => value1, attr_y => value2);
>
> Robby
next prev parent reply other threads:[~2001-07-05 18:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-05 17:58 Syntax Question Robby Simpson
2001-07-05 18:32 ` Marin David Condic [this message]
2001-07-05 18:38 ` Robby Simpson
2001-07-05 19:09 ` Ted Dennison
2001-07-05 20:14 ` Robby Simpson
2001-07-05 21:44 ` Robert Dewar
2001-07-09 12:39 ` Robby Simpson
-- strict thread matches above, loose matches on Subject: below --
1995-03-11 10:12 Syntax question Geoffrey Hollingworth
1995-03-11 15:16 ` Robert A Duff
1995-03-11 20:45 ` Michael Feldman
1995-03-15 23:29 ` David Kusuda
1995-03-16 2:25 ` David Weller
1995-03-16 14:44 ` Spencer Allain
1995-03-19 1:04 ` Robert Dewar
1995-03-16 9:19 ` Fred J. McCall
1995-03-17 5:44 ` Niklas Holsti
1995-03-19 20:53 ` Robert Dewar
1995-03-11 21:44 ` Road Pilot
1995-03-23 13:07 ` Bob Collins
1995-03-24 1:11 ` Kevin F. Quinn
1995-03-27 14:19 ` Norman H. Cohen
1995-03-13 4:43 ` Keith Thompson
1995-03-16 20:37 ` Norman H. Cohen
1995-03-21 0:51 ` Robert Dewar
1995-03-16 19:20 ` Adam Beneschan
[not found] <Cx6pG3.IEp@ucc.su.oz.au>
1994-10-05 14:20 ` Tucker Taft
[not found] ` <36ui0u$4dg@gnat.cs.nyu.edu>
1994-10-06 0:04 ` David Weller
1994-10-05 5:19 Adrian Cho
1994-10-05 11:52 ` Robert Dewar
1994-10-05 17:19 ` Norman H. Cohen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox