082. Two types of syntax for defining a function#

topic: Procedures

Note

This tip is a draft1.

Ways of defining a function:

  1. Function and result name are the same.

  2. RESULT has a different name within the function, which can be used to return an array.

RETURN, when needed, is used to exit the function, not set its value.



1

From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.