Re: Multiple return values

mark@omnifest.uwm.edu (Mark Hopkins)
13 May 1997 22:46:59 -0400

          From comp.compilers

Related articles
[23 earlier articles]
Re: Multiple return values gscase@interact.net.au (1997-05-04)
Re: Multiple return values Robert.Harley@inria.fr (1997-05-04)
Re: Multiple return values tim@franck.Princeton.EDU (1997-05-04)
Re: Multiple return values jens.hansson@mailbox.swipnet.se (1997-05-04)
Re: Multiple return values jamesl@netcom.com (1997-05-08)
Re: Multiple return values hbaker@netcom.com (1997-05-08)
Re: Multiple return values mark@omnifest.uwm.edu (1997-05-13)
Re: Multiple return values bear@sonic.net (Ray Dillinger) (1997-05-13)
Re: Multiple return values jan@fsnif.neuroinformatik.ruhr-uni-bochum.de (Jan Vorbrueggen) (1997-05-14)
Re: Multiple return values hbaker@netcom.com (1997-05-14)
Re: Multiple return values markt@harlequin.co.uk (Mark Tillotson) (1997-05-25)
Re: Multiple return values hbaker@netcom.com (1997-05-25)
Re: Multiple return values jmccarty@sun1307.spd.dsccc.com (1997-05-30)
| List of all articles for this month |

From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: comp.compilers
Date: 13 May 1997 22:46:59 -0400
Organization: Omnifest
Keywords: design

      What's missing that will make everything easier is (a) structured
expressions, example: { 3, 5, 3, 2 } is a constant of type int [4],
also convertible to type struct { int; int; int; int; }, or even int
[]. (b) assignments to structured variables, example: {X, Y} =
IntPair();


      It's not a major problem to extend C in this direction, since it
already allows variables to be initialized to structured constants.
So just allow structured constants and expressions in a most general
context, in the extended language, and fix up the syntax as needed.


      Then, as a automatic consequence, you'll have functions which can
return multiple values.


      One additional thing that could be added to make things easier is
the "anonymous" structure, example: struct { int; int; int; int; } as
above, where the fields are not named.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.