F90: Lendo de um arquivo

From AdonaiMedrado.Pro.Br
Revision as of 15:01, 11 November 2008 by Adonaimedrado (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Arquivo aula.f90

PROGRAM aula
	IMPLICIT NONE
	INTEGER :: A,B
	OPEN (UNIT=10, FILE="aula.txt", STATUS="OLD")
	READ (10,*) A
	READ (10,*) B
	WRITE (*,*) A+B
	CLOSE (10)
END PROGRAM aula

Exemplo do conteúdo do arquivo aula.txt

3
4