Automatic objects

An automatic object is a data object dynamically allocated within a procedure Fortran 2008 beginsor a BLOCK constructFortran 2008 ends. This object is a local entity of a subprogram Fortran 2008 beginsor a BLOCK constructFortran 2008 ends and can have a nonconstant character length, a nonconstant array bound, or both. An automatic object is not a dummy argument.

An automatic object always has the controlled automatic storage class.

You cannot specify an automatic object in any of the following statements: Also, automatic objects cannot have the AUTOMATIC, PARAMETER, SAVE, or STATIC attributes. You cannot initialize or define an automatic object with a constant expression in a type declaration statement, but an automatic object can have a default initialization. An automatic object must not appear in the specification part of a main program, a module, Fortran 2008 beginsor a submoduleFortran 2008 ends.

Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us