00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 program test9
00025   
00026   implicit none
00027   include 'med.hf'
00028 
00029   integer        ret,cret,fid
00030   character*32   maa
00031   integer        mdim
00032   integer        nfam
00033   integer        i,j
00034   integer        natt,ngro
00035   character*200, allocatable, dimension (:) :: attdes    
00036   character*80,  allocatable, dimension (:) :: gro       
00037   integer,       allocatable, dimension (:) :: attval,attide
00038   character*32   nomfam
00039   character*200  desc
00040   integer        numfam
00041   integer        type
00042 
00043 
00044 
00045   call efouvr(fid,'test8.med',MED_LECTURE, cret)
00046   print *,cret
00047 
00048 
00049   if (cret.eq.0) then
00050      call efmaai(fid,1,maa,mdim,type,desc,cret)
00051      print *,"Maillage de nom : ",maa," et de dimension : ", mdim
00052   endif
00053   print *,cret
00054 
00055 
00056   if (cret .eq. 0) then
00057      call efnfam(fid,maa,nfam,cret)
00058      print *,' Nombre de familles a lire : ',nfam
00059   endif
00060   print *,cret
00061 
00062 
00063   if (cret .eq. 0) then
00064      do i=1,nfam
00065         
00066 
00067         if (cret .eq. 0) then
00068            call efngro(fid,maa,i,ngro,cret)
00069         endif
00070         print *,cret
00071 
00072 
00073         if (cret .eq. 0) then
00074            call efnatt(fid,maa,i,natt,cret)
00075         endif
00076         print *,cret
00077 
00078         print *,"Famille ",i," a ",natt," attributs et ",ngro," groupes " 
00079 
00080 
00081         if (cret .eq. 0) then
00082            allocate(attide(natt),attval(natt),attdes(natt),gro(ngro),STAT=ret)
00083 
00084 
00085            call effami(fid,maa,i,nomfam,numfam,attide,     &
00086                 &                     attval,attdes,natt,gro,ngro,cret)
00087            print *,cret
00088            print *,"Famille de nom ",nomfam," et de numero ",numfam
00089            print *,"Attributs :"
00090            do j=1,natt
00091               print *,"ide = ",attide(j)," - val = ",attval(j)," - des = ",attdes(j)
00092            enddo
00093            deallocate(attide,attval,attdes)
00094 
00095            do j=1,ngro
00096               print *,"gro = ",gro(j)
00097            enddo
00098            deallocate(gro)
00099         endif
00100      enddo
00101   endif
00102      
00103      
00104 
00105      call efferm (fid,cret)
00106      print *,cret
00107      
00108 
00109      call efexit(cret)
00110      
00111    end program test9
00112 
00113