X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04 Mar 2024 09:59 AM by  Ben Castellani
Undefined Variable
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Patrick Haines



New Member


Posts:
New Member


--
15 Feb 2024 03:32 PM
    I have the following code loop:

    for i=0, rows-1 do begin
    READF, lun, a, b, c, format='(A15,1x,F0,1x,F0)'
    filenames[i] = a
    latitude[i] = b
    longitude[i] = c
    help, a,b,c,i
    print,a, 'a'
    endfor

    and get these errors:
    % Variable is undefined: FILENAMES.
    % Execution halted at: $MAIN$ 1
    /home/phaines/climate/idlist_files/write_idlist_1.pro_test
    % Variable is undefined: LATITUDE.
    % Execution halted at: $MAIN$ 1
    /home/phaines/climate/idlist_files/write_idlist_1.pro_test
    % Variable is undefined: LONGITUDE.

    What do I do to fix this?

    Thank you.


    Ben Castellani



    Basic Member


    Posts:130
    Basic Member


    --
    04 Mar 2024 09:59 AM
    You seem to be trying to run IDL code with variables used which you have not yet defined in your IDL session. The variables you reference have to be defined by the time their line of code executes.
    You are not authorized to post a reply.