From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,157dc2d6be0aa579 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-05 20:38:17 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!noc.near.net!inmet!dsd!stt From: stt@dsd.camb.inmet.com (Tucker Taft) Subject: Re: Syntax question Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: Date: Wed, 5 Oct 1994 14:20:42 GMT Date: 1994-10-05T14:20:42+00:00 List-Id: In article , Adrian Cho 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