Opened 16 years ago

Closed 16 years ago

#144 closed enhancement (fixed)

Improvements to source text

Reported by: Stephen Siegel Owned by: ywei
Priority: trivial Milestone:
Component: front Version: 1.0
Keywords: for loop source Cc:

Description

This is all very minor but would improve the output a little.
In a for loop, the text associated to the increment expression extends one character beyond the expression, which usually means it includes the right parenthesis:

diffusion1_par.mmp line 25 proc 0 [MPI_Send@3->MPI_Send@1] "i++)" 

If it were not in a for statement, this would be correct because you want to include the final semicolon, but here it doesn't look good.

Also, for the conditional node associated to a for loop node, the source text includes the entire for expression:

diffusion1_par.mmp line 25 proc 0 [MPI_Send@1->MPI_Send@4] "for (i=0; i<count; i++)" [false] 

which I find a little confusing or inconsistent, because this statement is not executing the initialization or increment statements, it is only checking the loop continuation condition. Could we just include the condition here: "i<count" ?

Change History (2)

comment:1 by ywei, 16 years ago

Status: newaccepted

comment:2 by ywei, 16 years ago

Resolution: fixed
Status: acceptedclosed

Fixed. The source information is more accurate now.

Note: See TracTickets for help on using tickets.