function get_pds_value, file, keyword ; ; Extract a value (string format) from a label ; given the keyword (string). ; ; Inputs: ; file - name of the PDS label file ; keyword - the PDS keyword ; ; Version 1.0, 18-May-2009 ; T. H. Prettyman ; Planetary Science Institute ; ; Revision history: ; *Print out the error state message on open, THP 12-Jul-2013 result=-1 openr, lun, file, /get_lun, error=err if (err ne 0) then begin print, !error_state.msg print, ' ERROR: Problem opening label file ' return, result endif line='' JUMP0: readf, lun, line test=strpos(line,keyword) if (test ge 0) then goto, JUMP1 if (eof(lun)) then return, result goto, JUMP0 JUMP1: split=strtrim(strsplit(line,'=',/extract),2) if (n_elements(split) ne 2) then return, result result=split[1] free_lun, lun return, result end