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.

Instruction INQUIRE 146<br />

7.8 – Instruction INQUIRE<br />

L’instruction d’interrogation INQUIRE permet de<br />

récupérer un certain nombre d’informations concernant<br />

un fichier ou un numéro d’unité logique.<br />

Elle permet par exemple de tester si un fichier existe,<br />

s’il est connecté et dans ce cas de connaître les valeurs<br />

des paramètres positionnés lors de son ouverture via<br />

OPEN.<br />

Cette interrogation peut être faite en indiquant soit<br />

le numéro d’unité logique soit le nom du fichier.<br />

program inquire<br />

LOGICAL existe<br />

INTEGER ios<br />

CHARACTER(len=3) :: form<br />

CHARACTER(len=10) :: acces<br />

INQUIRE( FILE="data_txt_seq", EXIST=existe )<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!