Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Is it "GOTO" or "GO TO"?

chauvjo
Novice
2,405 Views

Quick question....I realize that the GOTO statement is to be avoided in programming but am curious as to which is the correct syntax for this command:  GOTO or GO TO. I know both versions are supported by the compiler but would assume the standard would be specific about which versions is "correct".  Older standards seem to use GO TO while more current versions show GOTO.  I could be wrong here so defer to the experts.

Thanks....

0 Kudos
1 Reply
Steven_L_Intel1
Employee
2,405 Views

There is a set of multi-word keywords in Fortran that can be used with or without the space:

Adjacent keywords where separating blanks are optional
BLOCK DATA 
END INTERFACE
DOUBLE PRECISION
END MODULE

ELSE IF
END PROCEDURE

ELSE WHERE
END PROGRAM

END ASSOCIATE
END SELECT

END BLOCK
END SUBMODULE

END BLOCK DATA
END SUBROUTINE

END CRITICAL
END TYPE

END DO
END WHERE

END ENUM
GO TO

END FILE
IN OUT

END FORALL
SELECT CASE

END FUNCTION
SELECT TYPE

END IF

0 Kudos
Reply