X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Apr 2010 01:31 PM by  anon
'Save' function not working correctly?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
12 Apr 2010 01:31 PM
    The Size function doesn't seem to be working like I think it should.  Here are some command line things I've tried.   According to the help file when the first element of the vector is zero, the argument of Size is a scalar or undefined.  In the cases below and in my program's call to this function, the argument is a string.  This is important because it bombs my program.  Previously, calls to this function worked.  I don't know what happened Here is what the help file says: "The first element is equal to the number of dimensions of Expression. This value is zero if Expression is scalar or undefined. The next elements contain the size of each dimension, one element per dimension (none if Expression is scalar or undefined). After the dimension sizes, the last two elements contain the type code (zero if undefined) and the number of elements in Expression, respectively. The type codes are listed below." Here are some examples of what I've tried: IDL> print, size('/Volumes/Apps_and_Docs/data_observing_processed/EPOXI/epoxi_analysis_output/header_tests/hrivis_canopus_080624_1_0_1.fit')            0           7           1 IDL> junk = 'crapola' IDL> print, size('junk')            0           7           1 IDL> print, size(junk)            0           7           1   These examples don't seem to work like the help file says they should... unless I don't understand.   Thanks in advance.   Rich  

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Apr 2010 09:09 AM
    first element = 0: argument is a scalar second-last element = 7: type code for string last element = 1: scalar   If you want the length of the string, use strlen()
    You are not authorized to post a reply.