[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Old Timers ??



Hello all,

    I've go some legacy code I'm trying to update and it looks like:

    ; Read text header from file
    ; until 'end header' reached.
    ;-----
    line = ''
    header = ''
    repeat begin
        readf, unit, line
        if (n_elements(header) eq 0) then $
        begin
            header = line
        endif else $
        begin
            header = [header,line]
        endelse
    endrep until (strtrim(line,2) eq 'end header')

    ;-----
    ; Close file.
    ;-----
    close, unit & free_lun, unit

    ;-----
    ;Get relevant info from the header.
    ;-----
    dda_header.file_id = $
        strtrim( get_keyword( header, 'file ID'), 2)


This code is circa 95 and it's balking at the get_keyword() function.  So my
questions are two:
1) Did previous versions of IDL have a get_keyword() (I'm 5.3 now)?
2) It's clear this code is simulating a HASH with Arrays, does IDL 5.3 have
native hash support of some kind?

Thanks,