Article View: comp.lang.misc
Article #6147Re: Passing Values Through a "goto"
From: Dick Dunn
Date: Thu, 12 Jan 1989 00:43
Date: Thu, 12 Jan 1989 00:43
21 lines
1636 bytes
1636 bytes
Karl Heuer wrote:
> >Passing values through a goto doesn't seem to work well, since a label by
> >itself is not a valid statement...
Victor Greenberg responded:
> Although goto is questionable as a language feature, it isn't hard to
> generalize for use in an expression based language. Instead of labelled
> statements, you want labelled *expressions*...
Another way to think of this is to consider assembly language; let's assume
it's for a stack-based processor just to make it easier. At the point of a
label, you need to know that the stack has a particular configuration no
matter how you get to that label. It is equivalent to having a particular
type associated with the label...and, in fact, one could imagine performing
a coercion on the values "sent" to the label. This is akin to the
balancing coercion required in a conditional expression--and, in fact, if
you think of the conditional-jump implementation of a conditional
expression, you can see the balancing taking place in the generated code.
--
Dick Dunn UUCP: {ncar,nbires}!ico!rcd (303)449-2870
...Worst-case analysis must never begin with "No one would ever want..."
Technical Details
Message-ID:
<13549@ico.ISC.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!ncar!ico!rcdReferences:
<3300001@uxg.cso.uiuc.edu> <3290002@hpctdls.HP.COM> <8901070434.AA10471@yorkville.csri.toronto.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!ncar!ico!rcd From: rcd@ico.ISC.COM (Dick Dunn) Newsgroups: comp.lang.misc Subject: Re: Passing Values Through a "goto" Summary: characteristic of assembly language Message-ID: <13549@ico.ISC.COM> Date: 12 Jan 89 00:43:32 GMT References: <3300001@uxg.cso.uiuc.edu> <3290002@hpctdls.HP.COM> <8901070434.AA10471@yorkville.csri.toronto.edu> Organization: Interactive Systems Corp, Boulder, CO Lines: 21