Path: utzoo!utgpu!watmath!att!pacbell!ames!ncar!unmvax!indri!caesar!blake!ogccse!cvedc!nosun!qiclab!m2xenix!dawggon!p101.f19.n490.z2.fidonet.org!Pat.Terry From: Pat.Terry@p101.f19.n490.z2.fidonet.org (Pat Terry) Newsgroups: comp.lang.modula2 Subject: RETURN/HALT Message-ID: <2908.24DBFE07@dawggon.fidonet.org> Date: 5 Aug 89 17:52:42 GMT Sender: ufgate@dawggon.fidonet.org (newsout1.26) Organization: FidoNet node 2:490/19.101 - Settler City Fido, Grahamstown RSA Lines: 65 (* RETURN and HALT at level 0 Recently doubt has been expressed as to the meaning of RETURN in program modules, and level 0 modules. I suggest that RETURN = HALT normally in main modules and RETURN = RETURN in level 0 modules At least one compiler has other ideas. I would be curious to have the results for compilers to which I do not have access. A simple test program follows *) MODULE Return; FROM InOut IMPORT WriteString; MODULE Inner; IMPORT WriteString; BEGIN WriteString('inner1'); RETURN; WriteString('inner2') END Inner; BEGIN WriteString('main1'); RETURN; WriteString('main2') END Return. (* Compiler Output ------------------------------------ Ana 68 (Sun) | Collier V2 | inner1main1 FST | inner1main1 - but RETURN is not "abnormal" whereas HALT would be FTL | rejects RETURN in both places Hamburg VAX | HP9000/800 | Logitech (MS-DOS 3.03) | inner1main1 Logitech (VAX) | MacMeth | MacModula-2 | Modula/370 | Oregon (80386/Xenix) | Oregon (Sun) | Pecan Modula-2 | Rowley | Stonybrook | Stonybrook (Quickmod) | inner1 (treats inner RETURN as HALT) Taylor | TDI (Atari ST) | TopSpeed | inner1main1 Volition Sage/Stride | inner1main1 *) -- uucp: {mcvax!uunet,tektronix,sun!nosun}!oresoft!dawggon!2!490!19.101!Pat.Terry Internet: Pat.Terry@p101.f19.n490.z2.fidonet.org