🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #978

Re: JPI M2 2.00 - PROCEDURE FUNCTIONS & ERROR CHECKING

#978
From: Chuck Lins
Date: Wed, 25 Jul 1990 16:20
34 lines
2135 bytes
In article <90206.084158TRL3@psuvm.psu.edu> TRL3@psuvm.psu.edu (Tim Larson) writes:
>In article <10180@brazos.Rice.edu>, preston@erato.rice.edu (Preston Briggs)
>says:
>>You're correct that it isn't specified in the syntax.
>>I think it probably can't be.  However, the compiler
>>can still detect that there exists a path from the entrance
>>to the END of a function with no RETURN.  It's one of the
>>advantages of using control constructs with the infamous
>>"single-entrance, single-exit" property.
>>
>>If people are curious, I can show how it works;
>>but it'll be a somewhat involved posting.

	Yes, I wouldn't mind seeing you involved posting on how this would work

>>
>I would be very interested in that (references would be fine if the posting
>were too long).  However, you state the "single-entrance, single-exit"
>requirement, which Modula-2 neatly destroys with LOOP..END.  Is that require-
>ment necessary for the algorithm to work?

LOOP..END is still single-entry, single-exit. You always enter the loop at the
top, and will exit at the END statement. There's no way to jump into the
middle of the LOOP statement, or leave it at other than the predetermined
end.


-- 
Chuck Lins               | "Is this the kind of work you'd like to do?"
Apple Computer, Inc.     | -- Front 242
20525 Mariani Avenue     | Internet:  lins@apple.com
Mail Stop 37-BD          | AppleLink: LINS@applelink.apple.com
Cupertino, CA 95014      | "Self-proclaimed Object Oberon Evangelist"
The intersection of Apple's ideas and my ideas yields the empty set.
Technical Details
Message-ID: <43331@apple.Apple.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!apple!lins
References: <1960.26A95065@puddle.fidonet.org> <90204.213559TRL3@psuvm.psu.edu> <1990Jul24.060519.23417@portia.Stanford.EDU> <10180@brazos.Rice.edu> <90206.084158TRL3@psuvm.psu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!apple!lins
From: lins@Apple.COM (Chuck Lins)
Newsgroups: comp.lang.modula2
Subject: Re: JPI M2 2.00 - PROCEDURE FUNCTIONS & ERROR CHECKING
Summary: LOOP is still single entry-single exit
Message-ID: <43331@apple.Apple.COM>
Date: 25 Jul 90 16:20:45 GMT
References: <1960.26A95065@puddle.fidonet.org> <90204.213559TRL3@psuvm.psu.edu> <1990Jul24.060519.23417@portia.Stanford.EDU> <10180@brazos.Rice.edu> <90206.084158TRL3@psuvm.psu.edu>
Organization: Apple Computer Inc, Cupertino, CA
Lines: 34