Commandes en fortran

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

17 Terms

1
New cards
Comment écrire un programme principal en Fortran ?
program nom_programme … end program nom
2
New cards
Comment écrire un sous-programme (subroutine) en Fortran ?
subroutine nom(arguments) 
type argument 
… 
end

3
New cards
Comment appeler un sous programme dans un programme?
call nom_sousprogr(arguments)

4
New cards
Comment écrire une fonction en Fortran ?
real function nom_fonction(x) 
… 
nom_fonction = … 
return nom_fonction
end

5
New cards
arduino

Comment écrire un module en Fortran ?
begin module nom_module 
... 
end module nom_module

6
New cards
Comment écrire un test if / elseif / endif en Fortran ?
if (condition) then 
… 
elseif (autre condition) then 
… 
endif

7
New cards
Comment écrire une boucle déterministe do en Fortran ?
do i = ideb, ifin, ipas 
… 
enddo

8
New cards
Comment écrire une boucle indéterministe do / exit en Fortran ?
do 
	… 
	if (condition) then 
		...
		exit 
	endif 
	… 
enddo

9
New cards
Comment appeler une subroutine avec un tableau a(n,n) dans le programme principal ?
call sub(n,a)

10
New cards
Comment déclarer la subroutine sub qui reçoit n et un tableau a(n,n) ?
subroutine sub(n,a)

real a(n,n)

end

11
New cards
Comment Fortran transmet un tableau à un sous-programme ?
en passant l’adresse du premier élément du tableau
12
New cards
Que doit-on préciser dans un sous-programme lorsqu’un tableau est passé en argument ?
le nombre d’éléments du tableau réellement utilisés
13
New cards
Quel mot-clé utiliser pour préciser qu’un argument est une fonction ou une subroutine ?
external
14
New cards
Comment déclarer une fonction maf comme argument dans le programme principal ?
real, external :: maf

15
New cards
Comment appeler une subroutine en lui passant un tableau et une fonction maf ?
call sub(n,a,maf)

16
New cards
Comment déclarer dans sub que f est une fonction passée en argument ?
real, external :: f

17
New cards
Comment écrire l’en-tête de la subroutine sub recevant n, un tableau, et une fonction f ?
subroutine sub(n,a,f)