; ;========================================================================== ; ; FILE: uffieldnumber.pro ; ; USAGE: result = UFfieldnumber(ufbuf, fname) ; ARGUMENTS ufbuf Buffer of UF words for a dwell of radar data ; fname 2 character ASCII name of the data field ; ; ABSTRACT: Return the logical "position" number of the named field from a ; UF dwell buffer. Position is 1 or greater. ; ; AUTHOR: I. Jeff Caylor ; Science Systems and Applications, Inc. ; 5900 Princess Garden Parkway, Suite 300 ; Lanham, MD 20706 ; ; at: NASA Goddard Space Flight Center ; Code 912 ; Greenbelt, MD 20771 ; Voice: (301) 286-3767 ; Fax: (301) 286-1762 ; Email: jeff.caylor@gsfc.nasa.gov ; ; CREATED: 7 April 1995 ; ; MODIFIED: ; ;========================================================================== ; ; ; Return the "position" number of the named field ; The name should be a 2 character ASCII string ; FUNCTION UFfieldnumber, dwell, fname d = UFdatahdr(dwell) nfields = UFfields(dwell) f = 1 matched = 0 fname = STRUPCASE(fname) WHILE (f LE nfields) AND (matched NE 1) DO $ IF (fname EQ UFfieldname(dwell, f)) THEN matched = 1 ELSE f = f + 1 IF (matched NE 1) THEN f = -1 RETURN, f END