On Jun 11, 2007, at 11:18 AM, Micha Nelissen wrote:
Gale Paeper wrote:
c) S is a statement of the statement-sequence of the compound- statement of the statement-part of a block containing G.
This is certainly not a trivial statement, care to explain why this is not the case ? Seems to me this one applies here.
You're correct in that it isn't a trivial statement. Exactly what is legally allowed by that statement requires using the ISO standard's definition of the terms used in the statement.
For the program in question, the "compound-statement of the statement- part of a block containing G" is:
begin if False then begin 10: Exit end; goto 10 end;
In abstract terms, the statements in the statement-sequence of that compound-statement are:
if-statement goto-statement
Since there is no statement in that statement sequence prefixed by the label "10", the label "10" is not permitted to occur in the goto statement by that c) condition.
Note: The exit-statement is contained by the if-statement. Thus, the exit-statement is not a statement in the statement-sequence; it is merely a component of the if-statement. Per definition, it is the if- statement which is the statement in the statement-sequence.
I'll note that the c) condition is also what permits non-local goto's. However, in the example program, the label isn't defined in the containing program block so the only containing block of the goto- statement involved is procedure p's block.
Gale Paeper gpaeper@empirenet.com