Open xmh0511 opened 3 months ago
Let's annotate the init-statement and expressions in the for
statement with #F1
~#F3
. I think [stmt.for] (together with [stmt.while], [stmt.if], and [stmt.goto] if needed) clearly indicates that the next full-expression to #3
is the expression in #F2
.
int main(){
int a = 1;
a = 2; // #1
a = 3; // #2
for(
int I = 0; // #F1
I < 10; // #F2
I++ // #F3
){
a = I; // #3
}
}
Is there anything missing?
Let's annotate the init-statement and expressions in the
for
statement with#F1
~#F3
. I think [stmt.for] (together with [stmt.while], [stmt.if], and [stmt.goto] if needed) clearly indicates that the next full-expression to#3
is the expression in#F2
.int main(){ int a = 1; a = 2; // #1 a = 3; // #2 for( int I = 0; // #F1 I < 10; // #F2 I++ // #F3 ){ a = I; // #3 } }
Is there anything missing?
I think your argument doesn't conflict with what I proposed in the suggestion. I suggested that the next full-expression should be defined in terms of control flow. Moreover, the next full-expression seems to have a transitive relationship, that is the next full-expression to #1
can also be #F1
.
#2
is an immediate next full-expression of #1
.
"the next full-expression to be evaluated" means the next full-expression that will be evaluated, and which full-expression will be evaluated next is obviously determined by control flow, so, I do not think there is anything here that needs clarification.
Full name of submitter (unless configured in github; will be published with the issue): Jim X
Intuitively, it is easy to say
#2
is the next full-expression to#1
. How about every evaluation at#3
in each iteration? We seem to lack the wording to specify that the evaluation at#3
next time is the next full-expression to the one at last time.Suggested Resolution
We may want to associate "next full-expression" with control flow?