[J3] (SC22WG5.6291) RE: [ukfortran] WG5 letter ballot 1 on Fortran 2018 interpretations
malcolm at nag-j.co.jp
Mon Oct 5 01:13:19 EDT 2020
This is not my vote... I am considering:
-N- --- F18/015 Example in C.6.8 is wrong
I have three problems with this interp; the first two are the same issues Anton raised. Before I commit my suggestions to a vote, I am floating this in hope of receiving some enlightening comments...
I don't see a strong reason to follow the existing formula precisely - 0.5% is not terribly close to 1% so the 1% comment is a bit misleading anyway. So how about:
! With 10+ images, keep at least 1% spare.
images_spare = MERGE(0,CEILING(NUM_IMAGES()/100.0),NUM_IMAGES()<10)
Obviously this keeps more spare images than the original (the same number up to 100, +1 when >100).
I agree that a variable with the same name as an intrinsic is not good style.
"team_num" would be okay.
But I do not agree that the intrinsic should be used at line 88 - that should be the variable.
I find the use of STAT= followed by ignoring the result to be very poor style indeed - unacceptably poor. I note that other places have e.g.
IF (STATUS/=0 .AND. STATUS/=STAT_FAILED_IMAGE) EXIT outer
I think this should be the case for the END TEAM and its following SYNC ALL statement.
Or, if there is some good reason why not, that needs to be at least briefly explained in a comment after each of those statements.
..............Malcolm Cohen, NAG Oxford/Tokyo.
More information about the J3