X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Nov 2006 07:43 PM by  anon
why this program is error
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Nov 2006 07:43 PM
    pro para tape7_0 = filepath('tape7_0.scn',root_dir=['d:']) data_0 = read_ascii(tape7_0, data_star=11, count=count, num_records= 20) tape7_0_columns = {freq_mcrn:0.0, tran:0.0, pth_thrml:0.0, $ surf_emis:0.0, sol_scat:0.0, sing_scat:0.0, grnd_rflt:0.0, $ drct_rflt:0.0, total_rad:0.0, ref_sol0:0.0, sol_obs:0.0, $ depth:0.0} tape7_0_columns_array = replicate(tape7_0_columns,count) tape7_0_columns_array.depth = reform(data_0.field01[11,*]) print, tape7_0_columns_array.depth[0:9] ;;;;; this is error, but i don't know end ;;;;; the 'print.........' this lines is error, and the error information is 'Subscript range values of the form low:high must be >= 0, .' i want to print elements of 1 to 10, and i am sure tape7_0_columns_array.depth is a array of 20 elements, but what is wrong?

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Nov 2006 07:43 PM
    This is the proper syntax for getting to the array of values held in one field by an array of structs: print, tape7_0_columns_array[0:9].depth i.e. "print the depth field value of structs 'tape7_0_columns_array[0:9]'.
    You are not authorized to post a reply.