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

David: for your book ?


   Testing IDL's capabilities is always dangerous: you might get more
than you ask for!

What would you expect to get out of the following:

test = [ 'dir1/', 'directory2/', 'another_directory/' ]


Well, I at least had expected to get the directory names without the
trailing '/'.
But, no! 
  help, strmid(test,0,strlen(test)-1)
reveals that the result is a 3x3 array!! To print it nicely, use a
format statement:
  print,strmid(test,0,strlen(test)-1),format='(3(3(">",A,"< "),/))' 

So, to achieve what I had in mind I either have to loop or extract the
matrix diagonale!
Does this make any sense, or is IDL simply overachieving here?


[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie    [[
[[                      Bundesstr. 55, 20146 Hamburg             [[
[[                      phone: +49 40 41173-308                  [[
[[                      fax:   +49 40 41173-298                  [[
[[ martin.schultz@dkrz.de                                        [[