function,endfunctionfor defining a function.subroutine,endsubroutinefor defining a subroutine.containsstatement, used to define procedures within the body of a program.callstatement for invoking a subroutine.intentattribute to specify the intention of each procedure argument. (Possible values areintent(in)for an input argument,intent(out)for an output argument, andintent(inout)for an input-output argument.)pureattribute can be used to prohibit side effects in procedures.elementalattribute allows procedures to operate on both scalars and arrays of any rank and size. (By default,elementalprocedures are alsopure.)impureelementalcan be used when you need an elemental procedure that can’t be defined as pure.optionalattribute allows you to declare a procedure argument as optional (keyword).- Built-in functions:
real–Converts a numerical value to a real value. (This function is distinct from therealdata type used in declarations.)size–Returns the integer size of an array.present–Checks for the presence of an optional argument inside the procedure.
New Fortran elements, at a glance