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.

Les tests 67<br />

5.1 – Les tests<br />

5.1.1 – Le bloc IF<br />

[nom_bloc: ] IF( exp 1<br />

)THEN<br />

bloc 1<br />

[ELSE IF( exp 2<br />

)THEN [nom_bloc]<br />

bloc 2<br />

...<br />

[ELSE [nom_bloc]<br />

bloc n ]]<br />

☞ nom bloc une étiquette,<br />

END IF [nom_bloc]<br />

☞ exp i une expression de type LOGICAL,<br />

☞ bloc i une suite d’instructions Fortran.<br />

En l’absence de clause ELSE lorsque bloc 1 est réduit à<br />

une seule instruction, la structure IF se simplifie en :<br />

IF (exp) instruction<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!