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.

Common étiqueté 179<br />

Exemple<br />

PROGRAM common_save<br />

call first<br />

call second<br />

END PROGRAM common_save<br />

!*************************************<br />

SUBROUTINE first<br />

REAL, DIMENSION(6) :: rtab<br />

LOGICAL<br />

:: drapeau<br />

COMMON/BLOC/ rtab,drapeau<br />

SAVE /BLOC/<br />

CALL random_number(rtab)<br />

PRINT*,’Afficher le tableau (true/false)’<br />

READ(*,*) drapeau<br />

END SUBROUTINE first<br />

!*************************************<br />

SUBROUTINE second<br />

REAL, DIMENSION(6) :: rtab<br />

LOGICAL<br />

:: drapeau<br />

COMMON /BLOC/<br />

rtab,drapeau<br />

SAVE /BLOC/<br />

IF (drapeau) PRINT*,’Tableau de réels<br />

END SUBROUTINE second<br />

= ’, rtab<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!