02.05.2014 Views

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Initialisation 47<br />

Exemple<br />

REAL A, B, C<br />

INTEGER N, M<br />

LOGICAL arret<br />

DATA A, B, N/1.0, 2.0, 17/<br />

DATA C/2.6/, M/3/<br />

DATA arret/.FALSE./<br />

Remarques :<br />

☞ cette instruction peut apparaître après des instructions<br />

exécutables, mais la norme F95 a déclaré cette<br />

possibilité comme obsolète,<br />

☞ les variables initialisées par ce moyen héritent de<br />

l’attribut SAVE : elles sont alors permanentes (cf.<br />

chapitre Procédures, section Durée de vie des<br />

identificateurs),<br />

☞ ce type d’initialisation peut être faite directement lors<br />

de la déclaration.<br />

Exemple<br />

REAL<br />

INTEGER<br />

LOGICAL<br />

A/3.14/, B/2.718/<br />

N/1/, M/4/<br />

arret/.false./<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!