c c function iscan (list,nvals,strng) c c c PROGRAM NAME: ISCAN.rat c c DATE OF FIRST VERSION: c DATE OF CURRENT VERSION: 21-Jun-83 c c PURPOSE: PLT function to scan LIST array (8 bytes per entry, c length = NVALS), looking for an occurrence of STRNG. c Only the first 4 characters are considered. c c USAGE: I = ISCAN (LIST,NVALS,STRNG) c c Where LIST -- Array of 8-byte strings to consider c NVALS -- Number of elements in LIST c STRNG -- String to look for c I -- Function return. If a match was c found between STRNG and an c element of LIST, it is set to c number of the element in LIST c where the match occurred. c Otherwise, function return is 0. c c PROGRAMMER: Eric Javel c c********************************************************************* c real*8 list(1),elemnt bytestrng(1),c(4),d(8) equivalence (elemnt,d(1)) c c--------------------------------------------------------------------- c c Get the first 4 characters of the string and convert letters to upper case do 23000 i=1,4 c(i) = strng(i) .and. "337 23000 continue c Compare it with those in LIST c for i=1 23002 if(.not.(i.le.nvals))goto 23004 elemnt = list(i) if(.not.(c(1).eq.d(1) .and. c(2).eq.d(2) .and. c(3).eq.d(3) & .and. c(4).eq.d(4)))goto 23005 iscan = i return 23005 continue i=i+1 goto 23002 c endfor 23004 continue iscan = 0 return end