02.05.2014 Views

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

La directive INCLUDE 185<br />

SUBROUTINE sub<br />

IMPLICIT NONE<br />

INCLUDE ’inclusion.inc’<br />

PRINT*,’Tableau réels = ’, rtab<br />

PRINT*,’Tableau logique = ’, ltab<br />

END SUBROUTINE sub<br />

Le fichier inclusion.inc contient les déclarations de<br />

COMMONs et de paramètres :<br />

DOUBLE PRECISION, PARAMETER :: PI=3.14159265d0<br />

DOUBLE PRECISION, DIMENSION(6) :: rtab<br />

LOGICAL, DIMENSION(3)<br />

:: ltab<br />

COMMON rtab,ltab<br />

Remarques :<br />

☞ L’inclusion du contenu du fichier se fait là où est placée<br />

la directive INCLUDE,<br />

☞ Il est possible d’imbriquer plusieurs directives INCLUDE.<br />

Le nombre d’imbrications possible dépend du compilateur.<br />

☞ La localisation du fichier à inclure peut être précisée à<br />

l’aide de l’option -I du système de compilation.<br />

INSTITUT DU DÉVELOPPEMENT<br />

ET DES RESSOURCES<br />

EN INFORMATIQUE SCIENTIFIQUE<br />

Cours langage Fortran – 27 janvier 2006<br />

<strong>Patrick</strong> <strong>Corde</strong> et <strong>Anne</strong> <strong>Fouilloux</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!