Clicky

Fortran Wiki
implicit none (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #0 to #1: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

In Fortran, by default the type of variables whose names start with I...N is INTEGER, and REAL otherwise. It is a legacy of the past and it is know strongly advised to put an implicit none statement in your program and in each module. That statement was added in the Fortran 90 standard.

Be conscious that if you put an implicit none at the top of a module, it will apply to the procedures in the contains section of the module, but not to the interface section:

module example
implicit none
interface
 integer function one(i)
 ! Here i will be implicitly an INTEGER, except if you add an implicit none here
 end function
end interface
contains
 integer function two(j)
 ! The compiler will detect an error because j is not declared
 end function jfun
end module example

See also:

Created on March 11, 2023 12:35:18 by vmagnin (86.67.213.241) (1155 characters / 0.0 pages)
Edit | Views: Print | TeX | Source | Linked from: Dialects, kiss64

AltStyle によって変換されたページ (->オリジナル) /