From: stt@dsd.camb.inmet.com (Tucker Taft)
Subject: Re: Syntax question
Date: Wed, 5 Oct 1994 14:20:42 GMT
Date: 1994-10-05T14:20:42+00:00 [thread overview]
Message-ID: <Cx7EIJ.L2M@inmet.camb.inmet.com> (raw)
In-Reply-To: Cx6pG3.IEp@ucc.su.oz.au
In article <Cx6pG3.IEp@ucc.su.oz.au>, Adrian Cho <adrian@acm.org> wrote:
>I am writing a chart comparing the syntax of a number of
>languages for an English sentence.
>For example:
>
>English: Jack, put the box on the table
>
>Smalltalk: Jack putThe: box onThe: table
>
>C: putOn( Jack, box, table )
>
>C++: Jack.putOn( box, table )
Ada 83/9X: Please(Jack, Put => Box, On => Table);
(courtesy counts ;-)
>Would someone in this newsgroup be kind
>enough to e-mail to me (adrian@acm.org)
>the equivalent for the language of this
>newsgroup. I think the above example
>is self-explanatory. Jack, box, and
>table are entities or objects and 'put on' is
>an action or verb. Please use the correct case.
I will e-mail this as well.
Of course, there are an infinite number of alternatives; the
"courteous" one above takes advantage of the ability to use formal
parameter names to resolve overloading. Probably the more
natural (or more "demanding" ;-) thing would be:
Ada 83/9X: Put(Object => Box, On => Table, By => Jack);
Note that in Ada 9X, the "controlling" operand (presumably Jack
given the way you coded it in Smalltalk and C++) need not be
the first operand, and even if it is declared first, it can
be placed later in a call if named parameter notation is
used (as above). Also, there can be multiple controlling operands
(such as in "Shake_Hands(Jack, Jim)"); in such a case, all
controlling operands are treated symmetrically.
>Any help is much appreciated.
I hope the above helps.
>Thanks
>
>Adrian
>
>adrian@acm.org
S. Tucker Taft stt@inmet.com
Ada 9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA 02138
next parent reply other threads:[~1994-10-05 14:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Cx6pG3.IEp@ucc.su.oz.au>
1994-10-05 14:20 ` Tucker Taft [this message]
[not found] ` <36ui0u$4dg@gnat.cs.nyu.edu>
1994-10-06 0:04 ` Syntax question David Weller
2001-07-05 17:58 Syntax Question Robby Simpson
2001-07-05 18:32 ` Marin David Condic
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
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