To: J3 J3/18-267 From: Brian Friesen Subject: Syntax errors in example codes Date: 2018-October-15 Introduction ============ Two example codes contain syntax errors. First, in the example code in 16.9.84 ("GET_ENVIRONMENT_VARIABLE"), the instances of "LENGTH" on lines 29 and 30 should be replaced with "NAMELEN". Second, in example C.6.8 ("Example involving failed images"): 1.) The variable "k" is not declared, despite the presence of IMPLICIT NONE. 2.) The last ELSE IF ("ELSE IF (done)") is missing a corresponding "THEN". Edits to 18-007r1 ================= [374:29-30] 16.9.84 in the example, replace the instances of "LENGTH" on both lines with "NAMELEN", such that the full example code becomes: CHARACTER(:),ALLOCATABLE :: FILENAME INTEGER :: NAMELEN CALL GET_ENVIRONMENT_VARIABLE ("DATAFILE", LENGTH=NAMELEN) IF (NAMELEN>0) THEN ALLOCATE(CHARACTER(NAMELEN) :: FILENAME) CALL GET_ENVIRONMENT_VARIABLE("DATAFILE", FILENAME) END IF [544:3] C.6.8 in the example, after "status", insert ", k", such that line 3 becomes: "INTEGER :: images_used, i, images_spare, status, k" [545:6] C.6.8 in the example, after "ELSE IF (done)", insert "THEN", such that line 6 becomes: "ELSE IF (done) THEN"