Consider this code, which may have some typos in it. Which of these
numbered statements are valid?
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
Consider this code, which may have some typos in it. Which of these numbered statements are valid?
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
Consider this code, which may have some typos in it. Which of these numbered statements are valid?.
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
a: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */ YES
END; /* b */
CALL c(); /* 1: Valid? */ NO, NOT WITHIN SCOPE
CALL b(); YES
CALL cref(); /* 2: Valid? */ YES
CALL d(); REQUIRES EXTERNAL ATTRIBUTE
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */ NO, NOT WITHIN SCOPE
END /* a */
d: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
CALL a;
STOP;
dynamic: ;
END;
On Thursday, September 22, 2022 at 9:13:25 AM UTC+10, co...@ccil.org wrote:
Consider this code, which may have some typos in it. Which of these numbered statements are valid?.
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
a: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */ YES
END; /* b */
CALL c(); /* 1: Valid? */ NO, NOT WITHIN SCOPE
CALL b(); YES
CALL cref(); /* 2: Valid? */ YES
CALL d(); REQUIRES EXTERNAL ATTRIBUTE
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */ NO, NOT WITHIN SCOPE
END /* a */
d: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
CALL a;
STOP;
dynamic: ;
END;
On 9/21/22 9:59 PM, Robin Vowels wrote:.
On Thursday, September 22, 2022 at 9:13:25 AM UTC+10, co...@ccil.org wrote:
Consider this code, which may have some typos in it. Which of these numbered statements are valid?.
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
a: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */ YES
END; /* b */
CALL c(); /* 1: Valid? */ NO, NOT WITHIN SCOPE
CALL b(); YES
CALL cref(); /* 2: Valid? */ YES
CALL d(); REQUIRES EXTERNAL ATTRIBUTE
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */ NO, NOT WITHIN SCOPE
END /* a */
d: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
CALL a;
STOP;
dynamic: ;
END;
0 is not valid, because it is an unreachable statement..
On Thursday, September 22, 2022 at 12:23:38 PM UTC+10, John W. Kennedy wrote:
On 9/21/22 9:59 PM, Robin Vowels wrote:.
On Thursday, September 22, 2022 at 9:13:25 AM UTC+10, co...@ccil.org wrote: >>>> Consider this code, which may have some typos in it. Which of these
numbered statements are valid?.
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
a: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */ YES
END; /* b */
CALL c(); /* 1: Valid? */ NO, NOT WITHIN SCOPE
CALL b(); YES
CALL cref(); /* 2: Valid? */ YES
CALL d(); REQUIRES EXTERNAL ATTRIBUTE
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */ NO, NOT WITHIN SCOPE
END /* a */
d: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
CALL a;
STOP;
dynamic: ;
END;
0 is not valid, because it is an unreachable statement..
The statement GO TO STATIC; is in procedure A.
The label STATIC is in procedure A.
Therefore, the GO TO statement is legal and could transfer to
to label STATIC. LabelSTATIC is reachable from the GO TO statement.
.
The OP asked only whether the statements are valid or not,
not whether it made any sense to execute them in this skeleton program.
The OP asked only whether the statements are valid or not,
not whether it made any sense to execute them in this skeleton program.
On Thursday, September 22, 2022 at 4:06:23 AM UTC-4, Robin Vowels wrote:.
The OP asked only whether the statements are valid or not,Indeed, I ought not to have tried to present any such program, because
not whether it made any sense to execute them in this skeleton program.
to get it right *and* illustrate all my points is just too hard at my current state of understanding. But let me summarize what I think I have learned:
(a) A procedure E may call a procedure F that is directly contained in it,
or any top-level procedure, but not a procedure H that is contained in some other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
(b) A GOTO in a procedure X may jump to a label in X or any containing procedure at any level, but not to arbitrary procedures further
up the call stack. Presumably attempts to dodge this rule using label variables are likewise unavailing.
(c) From (a) and (b) together we can conclude that if procedure Z is directly or indirectly contained in procedure Y, then when Z is executing, Y is also on the call stack.
Yes?
On Thursday, September 22, 2022 at 12:23:38 PM UTC+10, John W. Kennedy wrote:
On 9/21/22 9:59 PM, Robin Vowels wrote:.
On Thursday, September 22, 2022 at 9:13:25 AM UTC+10, co...@ccil.org wrote: >>>> Consider this code, which may have some typos in it. Which of these numbered statements are valid?
.
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
a: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */ YES
END; /* b */
CALL c(); /* 1: Valid? */ NO, NOT WITHIN SCOPE
CALL b(); YES
CALL cref(); /* 2: Valid? */ YES
CALL d(); REQUIRES EXTERNAL ATTRIBUTE
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */ NO, NOT WITHIN SCOPE
END /* a */
d: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
CALL a;
STOP;
dynamic: ;
END;
0 is not valid, because it is an unreachable statement..
The statement GO TO STATIC; is in procedure A.
The label STATIC is in procedure A.
Therefore, the GO TO statement is legal and could transfer to
to label STATIC. LabelSTATIC is reachable from the GO TO statement.
.
The OP asked only whether the statements are valid or not,
not whether it made any sense to execute them in this skeleton program.
On Thursday, September 22, 2022 at 4:06:23 AM UTC-4, Robin Vowels wrote:
The OP asked only whether the statements are valid or not,
not whether it made any sense to execute them in this skeleton program.
Indeed, I ought not to have tried to present any such program, because
to get it right *and* illustrate all my points is just too hard at my current state of understanding. But let me summarize what I think I have learned:
(a) A procedure E may call a procedure F that is directly contained in it,
or any top-level procedure, but not a procedure H that is contained in some other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
(b) A GOTO in a procedure X may jump to a label in X or any containing procedure at any level, but not to arbitrary procedures further
up the call stack. Presumably attempts to dodge this rule using label variables are likewise unavailing.
(c) From (a) and (b) together we can conclude that if procedure Z is directly or indirectly contained in procedure Y, then when Z is executing, Y is also on the call stack.
Yes?
On 9/22/22 4:06 AM, Robin Vowels wrote:.
On Thursday, September 22, 2022 at 12:23:38 PM UTC+10, John W. Kennedy wrote:
On 9/21/22 9:59 PM, Robin Vowels wrote:.
On Thursday, September 22, 2022 at 9:13:25 AM UTC+10, co...@ccil.org wrote:
Consider this code, which may have some typos in it. Which of these numbered statements are valid?.
a: PROCEDURE();
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */
END; /* b */
CALL c(); /* 1: Valid? */
CALL b();
CALL cref(); /* 2: Valid? */
CALL d();
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */
END /* a */
d: PROCEDURE();
CALL a;
STOP;
dynamic: ;
END;
0) Jumps to statically enclosing procedure
1) Calls inner inner procedure without calling sub-procedure
2) Calls inner inner procedure via procedure variable set up by inner procedure
3) Jumps to dynamically invoking procedure
a: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
DECLARE cref ENTRY VARIABLE;
b: PROCEDURE();
c: PROCEDURE()
END /* c */;
cref = c;
RETURN;
GOTO static; /* 0: Valid? */ YES
END; /* b */
CALL c(); /* 1: Valid? */ NO, NOT WITHIN SCOPE
CALL b(); YES
CALL cref(); /* 2: Valid? */ YES
CALL d(); REQUIRES EXTERNAL ATTRIBUTE
RETURN();
static: ;
GOTO dynamic; /* 3: Valid? */ NO, NOT WITHIN SCOPE
END /* a */
d: PROCEDURE(); REQUIRES RECURSIVE ATTRIBUTE
CALL a;
STOP;
dynamic: ;
END;
0 is not valid, because it is an unreachable statement..
The statement GO TO STATIC; is in procedure A.
The label STATIC is in procedure A.
Therefore, the GO TO statement is legal and could transfer to
to label STATIC. LabelSTATIC is reachable from the GO TO statement.
.
The OP asked only whether the statements are valid or not,
not whether it made any sense to execute them in this skeleton program.
The problem is that there is no possible way to get TO the "GOTO static".
statement in the first place, and any compiler that is not hopelessly antique will catch this. I just tested on both clang and swiftc. I don’t have a mainframe.
On Thursday, September 22, 2022 at 4:06:23 AM UTC-4, Robin Vowels wrote:
The OP asked only whether the statements are valid or not,
not whether it made any sense to execute them in this skeleton program.
Indeed, I ought not to have tried to present any such program, because
to get it right *and* illustrate all my points is just too hard at my current state of understanding. But let me summarize what I think I have learned:
(a) A procedure E may call a procedure F that is directly contained in it,
or any top-level procedure, but not a procedure H that is contained in some other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
(b) A GOTO in a procedure X may jump to a label in X or any containing procedure at any level, but not to arbitrary procedures further
up the call stack. Presumably attempts to dodge this rule using label variables are likewise unavailing.
(c) From (a) and (b) together we can conclude that if procedure Z is directly or indirectly contained in procedure Y, then when Z is executing, Y is also on the call stack.
Yes?
(a) A procedure E may call a procedure F that is directly contained in it, or any top-level procedure, but not a procedure H that is contained in some other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
(a) and (b) are false.
Jumps (or exceptions)
remove all activations from source to target (target remains,
but anything below target is removed).
So minimally label contains address of machine
instruction and position on the stack (reference to stack
frame).
Note when I write "must"
I mean that to handle all cases you need extra info (or
at least some replacement). There are frequent special
cases that could be implemented easier.
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:
(a) A procedure E may call a procedure F that is directly contained in it, >>> or any top-level procedure, but not a procedure H that is contained in some >>> other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
(a) and (b) are false.
I don't see how (a) can be false: it follows from lexical scoping plus
stack discipline, and is a restatement of what you said. You cannot
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
Jumps (or exceptions)
remove all activations from source to target (target remains,
but anything below target is removed).
Jumps, yes; exceptions, no. If an ON-unit exits normally,
it returns to the point where the condition was SIGNALed; that
code may then raise ERROR and/or FINISH. Therefore the
stack cannot be removed until a jump is reached within the
ON-unit.
So minimally label contains address of machine
instruction and position on the stack (reference to stack
frame).
It actually needs to preserve the whole machine state; any
registers or flags that are live through the label must be
restored when the non-local GO TO is executed.
Question: if a file is open when the label is reached normally
and then closed before the GO TO is reached, is it automatically
reopened by the GO TO? (I hope not.)
Note when I write "must"
I mean that to handle all cases you need extra info (or
at least some replacement). There are frequent special
cases that could be implemented easier.
In general a label variable must maintain the full
information, unless the compiler can prove that there is
no non-local GO TO through this label variable, which in
the general case requires a whole-program compiler
(as when the label variable is declared EXTERNAL).
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
that code may then raise ERROR and/or FINISH..
Therefore the
stack cannot be removed until a jump is reached within the
ON-unit.
So minimally label contains address of machineIt actually needs to preserve the whole machine state; any
instruction and position on the stack (reference to stack
frame).
registers or flags that are live through the label must be
restored when the non-local GO TO is executed.
Question: if a file is open when the label is reached normally
and then closed before the GO TO is reached, is it automatically
reopened by the GO TO? (I hope not.)
Note when I write "must"In general a label variable must maintain the full
I mean that to handle all cases you need extra info (or
at least some replacement). There are frequent special
cases that could be implemented easier.
information, unless the compiler can prove that there is
no non-local GO TO through this label variable, which in
the general case requires a whole-program compiler
(as when the label variable is declared EXTERNAL).
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it, >>>> or any top-level procedure, but not a procedure H that is contained in some(a) and (b) are false.
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actially.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
.
Therefore the
stack cannot be removed until a jump is reached within the
ON-unit.
So minimally label contains address of machineIt actually needs to preserve the whole machine state; any
instruction and position on the stack (reference to stack
frame).
registers or flags that are live through the label must be
restored when the non-local GO TO is executed.
Question: if a file is open when the label is reached normally
and then closed before the GO TO is reached, is it automatically
reopened by the GO TO? (I hope not.)
Note when I write "must"In general a label variable must maintain the full
I mean that to handle all cases you need extra info (or
at least some replacement). There are frequent special
cases that could be implemented easier.
information, unless the compiler can prove that there is
no non-local GO TO through this label variable, which in
the general case requires a whole-program compiler
(as when the label variable is declared EXTERNAL).
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote: >>>> On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:
.
I don't see how (a) can be false: it follows from lexical scoping plus >>>> stack discipline, and is a restatement of what you said. You cannot(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition
was raised. Instead the ERROR condition is raised, and then (directly
or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus >>>> stack discipline, and is a restatement of what you said. You cannot(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
directly call G from E, and even if you have a variable containing G, >>>> you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition
was raised. Instead the ERROR condition is raised, and then (directly
or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus >>>>>> stack discipline, and is a restatement of what you said. You cannot >>>>>> directly call G from E, and even if you have a variable containing G, >>>>>> you cannot invoke it directly from E because the AUTOMATIC(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as
terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition >>> was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition
was raised. Instead the ERROR condition is raised, and then (directly
or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised. Normal return: Control returns to the point immediately following the point at
which the condition was raised.
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:
(a) A procedure E may call a procedure F that is directly contained in it,
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
(a) and (b) are false.
I don't see how (a) can be false: it follows from lexical scoping plus
stack discipline, and is a restatement of what you said.
You cannot
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
Jumps (or exceptions)
remove all activations from source to target (target remains,
but anything below target is removed).
Jumps, yes; exceptions, no. If an ON-unit exits normally,
it returns to the point where the condition was SIGNALed; that
code may then raise ERROR and/or FINISH. Therefore the
stack cannot be removed until a jump is reached within the
ON-unit.
So minimally label contains address of machine
instruction and position on the stack (reference to stack
frame).
It actually needs to preserve the whole machine state; any
registers or flags that are live through the label must be
restored when the non-local GO TO is executed.
Note when I write "must"
I mean that to handle all cases you need extra info (or
at least some replacement). There are frequent special
cases that could be implemented easier.
In general a label variable must maintain the full
information, unless the compiler can prove that there is
no non-local GO TO through this label variable, which in
the general case requires a whole-program compiler
(as when the label variable is declared EXTERNAL).
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus >>>>>>> stack discipline, and is a restatement of what you said. You cannot >>>>>>> directly call G from E, and even if you have a variable containing G, >>>>>>> you cannot invoke it directly from E because the AUTOMATIC(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains,
but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as
terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition
was raised. Instead the ERROR condition is raised, and then (directly
or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised.
Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what
happens after that depends on the condition, and the rules for each
condition are listed under that condition.
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus >>>>>>>> stack discipline, and is a restatement of what you said. You cannot >>>>>>>> directly call G from E, and even if you have a variable containing G, >>>>>>>> you cannot invoke it directly from E because the AUTOMATIC(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains, >>>>>>>>> but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as
terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition
was raised. Instead the ERROR condition is raised, and then (directly >>>>> or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised. >>> Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what
happens after that depends on the condition, and the rules for each
condition are listed under that condition.
Previous manuals agree with Robin. I really hope IBM didn’t change the language spec.
On 9/30/22 2:51 PM, Peter Flass wrote:
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot >>>>>>>>> directly call G from E, and even if you have a variable containing G, >>>>>>>>> you cannot invoke it directly from E because the AUTOMATIC
variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains, >>>>>>>>>> but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR
condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as >>>>>> terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition >>>>>> was raised. Instead the ERROR condition is raised, and then (directly >>>>>> or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised. >>>> Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what
happens after that depends on the condition, and the rules for each
condition are listed under that condition.
Previous manuals agree with Robin. I really hope IBM didn’t change the
language spec.
IBM’s Language Spec hasn’t changed since 1968.
The IBM Language Reference has been this way at least since 3.5 in 2005. Unfortunately, I haven’t anything going back years before that.
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 9/30/22 2:51 PM, Peter Flass wrote:
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot >>>>>>>>>> directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC >>>>>>>>>> variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally,
remove all activations from source to target (target remains, >>>>>>>>>>> but anything below target is removed).
it returns to the point where the condition was SIGNALed;
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR >>>>>>>>> condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as >>>>>>> terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition >>>>>>> was raised. Instead the ERROR condition is raised, and then (directly >>>>>>> or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised. >>>>> Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what
happens after that depends on the condition, and the rules for each
condition are listed under that condition.
Previous manuals agree with Robin. I really hope IBM didn’t change the >>> language spec.
IBM’s Language Spec hasn’t changed since 1968.
The IBM Language Reference has been this way at least since 3.5 in 2005.
Unfortunately, I haven’t anything going back years before that.
On reconsideration, I think you’re right. I have old manuals going back to the original PL/I spec and the PL/I(F) manuals (but only version 5, I believe) but I haven’t had a chance to check yet.
On 10/1/22 6:19 PM, Peter Flass wrote:
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 9/30/22 2:51 PM, Peter Flass wrote:
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl.
wrote:
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot >>>>>>>>>>> directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC >>>>>>>>>>> variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
Raised, actually.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally, >>>>>>>>>>> it returns to the point where the condition was SIGNALed; >>>>>>>>>> .
remove all activations from source to target (target remains, >>>>>>>>>>>> but anything below target is removed).
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR >>>>>>>>>> condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as >>>>>>>> terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition >>>>>>>> was raised. Instead the ERROR condition is raised, and then (directly >>>>>>>> or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised. >>>>>> Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what >>>>> happens after that depends on the condition, and the rules for each
condition are listed under that condition.
Previous manuals agree with Robin. I really hope IBM didn’t change the >>>> language spec.
IBM’s Language Spec hasn’t changed since 1968.
The IBM Language Reference has been this way at least since 3.5 in 2005. >>> Unfortunately, I haven’t anything going back years before that.
On reconsideration, I think you’re right. I have old manuals going back to >> the original PL/I spec and the PL/I(F) manuals (but only version 5, I
believe) but I haven’t had a chance to check yet.
The Optimizer/Checkout Language Reference for 1974 gives the old rule. I
wish I had an OS/2 manual (the first public form of the Toronto
compiler) to see whether the change went in then. Other obvious
possibilities would be the introduction of the Toronto compiler to
OS/390 or whenever IEEE-740 support was added.
John W Kennedy <john.w....@gmail.com> wrote:.
On 9/30/22 2:51 PM, Peter Flass wrote:
John W Kennedy <john.w....@gmail.com> wrote:
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot
directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC >>>>>>>>> variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally, >>>>>>>>> it returns to the point where the condition was SIGNALed;
remove all activations from source to target (target remains, >>>>>>>>>> but anything below target is removed).
Raised, actually.
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR >>>>>>>> condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as >>>>>> terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition >>>>>> was raised. Instead the ERROR condition is raised, and then (directly >>>>>> or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised.
Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what
happens after that depends on the condition, and the rules for each
condition are listed under that condition.
Previous manuals agree with Robin. I really hope IBM didn’t change the >> language spec.
IBM’s Language Spec hasn’t changed since 1968.
The IBM Language Reference has been this way at least since 3.5 in 2005. Unfortunately, I haven’t anything going back years before that.
On reconsideration, I think you’re right. I have old manuals going back to the original PL/I spec and the PL/I(F) manuals (but only version 5, I believe) but I haven’t had a chance to check yet.
On Sunday, October 2, 2022 at 9:19:30 AM UTC+11, bearlyabus...@gmail.com wrote:
John W Kennedy <john.w....@gmail.com> wrote:.
On 9/30/22 2:51 PM, Peter Flass wrote:On reconsideration, I think you’re right. I have old manuals going back to >> the original PL/I spec and the PL/I(F) manuals (but only version 5, I
John W Kennedy <john.w....@gmail.com> wrote:
On 9/28/22 10:39 PM, Robin Vowels wrote:
On Thursday, September 29, 2022 at 10:10:53 AM UTC+10, John W. Kennedy wrote:
On 9/28/22 6:46 AM, Robin Vowels wrote:.
On Wednesday, September 28, 2022 at 8:41:33 AM UTC+10, John W. Kennedy wrote:That is not the definition of "Normal return" that the Language
On 9/26/22 10:08 PM, Robin Vowels wrote:.
On Tuesday, September 27, 2022 at 1:56:20 AM UTC+10, co...@ccil.org wrote:
On Sunday, September 25, 2022 at 9:40:13 PM UTC-4, anti...@math.uni.wroc.pl wrote:.
I don't see how (a) can be false: it follows from lexical scoping plus(a) A procedure E may call a procedure F that is directly contained in it,(a) and (b) are false.
or any top-level procedure, but not a procedure H that is contained in some
other procedure G, even if G is F. Attempts to dodge this rule using procedure
variables are unavailing.
stack discipline, and is a restatement of what you said. You cannot >>>>>>>>>>> directly call G from E, and even if you have a variable containing G,
you cannot invoke it directly from E because the AUTOMATIC >>>>>>>>>>> variables of F are not on the stack.
The stack is irrelevant. There could be STATIC variables.
Raised, actually.Jumps (or exceptions)Jumps, yes; exceptions, no. If an ON-unit exits normally, >>>>>>>>>>> it returns to the point where the condition was SIGNALed; >>>>>>>>>> .
remove all activations from source to target (target remains, >>>>>>>>>>>> but anything below target is removed).
.
that code may then raise ERROR and/or FINISH..
If the return from the ON-unit was normal, neither the ERROR >>>>>>>>>> condition nor the FINISH condition can be raised.
Not so..
Exactly so. This occurs for all conditions that are not regarded as >>>>>>>> terminal, such as UNDERFLOW, OVERFLOW, STRINGSIZE, etc.
Normal return is to a point immediately after the point where the condition
was raised. The ERROR condition cannot be raised, as I said.
.
For serious errors, such as SUBSCRIPTRANGE, control does not
return to the point immedately after the point where the condition >>>>>>>> was raised. Instead the ERROR condition is raised, and then (directly >>>>>>>> or indirectly) the FINISH condition is raised.
.
CONDITION, INVALIDOP, OVERFLOW, STORAGE, SUBSCRIPTRANGE,.
UNDERFLOW (IEEE only), and ZERODIVIDE all raise ERROR.
OVERFLOW and ZERODIVIDE do not raise ERROR when there is an
active ON-unit in force. It is treated like UNDERFLOW.
Reference manual uses. For example:
OVERFLOW condition
...
Normal return
The ERROR condition is raised.
What manual are you reading?
.
OVERFLOW CONDTION
Implicit action: A message is printed and the ERROR condition is raised. >>>>>> Normal return: Control returns to the point immediately following the point at
which the condition was raised.
The newest one. (6.1, I think.) It says very plainly that “normal
return” means that the on-unit falls out the bottom, and that what >>>>> happens after that depends on the condition, and the rules for each
condition are listed under that condition.
Previous manuals agree with Robin. I really hope IBM didn’t change the >>>> language spec.
IBM’s Language Spec hasn’t changed since 1968.
The IBM Language Reference has been this way at least since 3.5 in 2005. >>> Unfortunately, I haven’t anything going back years before that.
believe) but I haven’t had a chance to check yet.
The early IBM PL/I manuals C28-6571-1 and -3 are not specific about
this. Current IBM one says that upon normal return from the OVERFLOW ON-unit, the ERROR condition is raised, so it seems that there has been
a change there.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 251 |
Nodes: | 16 (2 / 14) |
Uptime: | 23:39:28 |
Calls: | 5,544 |
Calls today: | 3 |
Files: | 11,676 |
Messages: | 5,109,037 |