test1.f

Aller à la documentation de ce fichier.
00001 C*  This file is part of MED.
00002 C*
00003 C*  COPYRIGHT (C) 1999 - 2012  EDF R&D, CEA/DEN
00004 C*  MED is free software: you can redistribute it and/or modify
00005 C*  it under the terms of the GNU Lesser General Public License as published by
00006 C*  the Free Software Foundation, either version 3 of the License, or
00007 C*  (at your option) any later version.
00008 C*
00009 C*  MED is distributed in the hope that it will be useful,
00010 C*  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 C*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 C*  GNU Lesser General Public License for more details.
00013 C*
00014 C*  You should have received a copy of the GNU Lesser General Public License
00015 C*  along with MED.  If not, see <http://www.gnu.org/licenses/>.
00016 C*
00017 
00018 C******************************************************************************
00019 C * - Description : open/close med files
00020 C *
00021 C *****************************************************************************
00022       program test1
00023 C     
00024       implicit none
00025       include 'med.hf'
00026 C
00027 C     
00028       integer cret
00029       integer fid
00030       character*200 des
00031       parameter (des = "Ceci est un courte description"
00032      1     // " du fichier test1.med")  
00033       
00034 C     Creation du fichier "test1.med"
00035       call mfiope(fid,'test1.med',MED_ACC_CREAT, cret)
00036       print *,cret
00037       if (cret .ne. 0 ) then
00038          print *,'Erreur à la création du fichier'
00039          call efexit(-1)
00040       endif      
00041 
00042 C     Ecriture d'un en-tete dans le fichier
00043       call mficow(fid,des,cret)
00044       print *,cret
00045       if (cret .ne. 0 ) then
00046          print *,'Erreur à ecriture en-tete'
00047          call efexit(-1)
00048       endif      
00049       
00050 C     Fermeture du fichier
00051       call mficlo(fid,cret)
00052       print *,cret
00053       if (cret .ne. 0 ) then
00054          print *,'Erreur à la fermeture du fichier'
00055          call efexit(-1)
00056       endif      
00057 
00058 C     Re-ouverture du fichier en lecture seule      
00059       call mfiope(fid,'test1.med',MED_ACC_RDONLY, cret)
00060       print *,cret
00061       if (cret .ne. 0 ) then
00062          print *,'Erreur ouverture du fichier en lecture'
00063          call efexit(-1)
00064       endif      
00065 
00066 C     Fermeture du fichier
00067       call mficlo(fid,cret)
00068       print *,cret
00069       if (cret .ne. 0 ) then
00070          print *,'Erreur à la fermeture du fichier'
00071          call efexit(-1)
00072       endif      
00073 
00074       end

Généré le Mon Nov 19 15:43:35 2012 pour MED fichier par  doxygen 1.6.1