1!$Id:$ 2 logical function usetmem(ulist,names, 3 & num,name,length,precis) 4 5! * * F E A P * * A Finite Element Analysis Program 6 7!.... Copyright (c) 1984-2017: Regents of the University of California 8! All rights reserved 9 10!-----[--.----+----.----+----.-----------------------------------------] 11! Purpose: Define, delete, or resize a dictionary entry. 12! Pointer defined for integer (single) and real 13! (double precision arrays. 14 15! Inputs: 16! ulist - Number of entries in user list 17! names(*) - Admissible names for user arrays 18! num - Entry number for array 19! name - Name of array 20! length - Length of array defined: =0 for delete 21! precis - Precision of array: 1 = integers; 2 = reals 22 23! Outputs: 24! up(num) - Pointer to first word of array in blank common 25!-----[--.----+----.----+----.-----------------------------------------] 26 27 implicit none 28 29 include 'allotd.h' 30 include 'allotn.h' 31 include 'pointer.h' 32 33 character names(*)*(*),name*(*) 34 logical setmem 35 integer ulist,num,length,precis,i,tlist 36 37 save 38 39! Merge lists 40 41 if(num.eq.-llist) then 42 do i = 1,ulist 43 up(i) = 0 44 nlist(llist+i) = names(i) 45 end do ! i 46 tlist = ulist + llist 47 usetmem = .true. 48 49! Allocate or deallocate an array 50 51 else 52 53 usetmem = setmem(tlist,ilist,nlist,num+llist,name,length,precis) 54 55 endif 56 57 end 58