comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » David: for your book ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
David: for your book ? [message #21233] Tue, 15 August 2000 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Hi,

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/' ]
print,strmid(test,0,strlen(test)-1)

??

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?

Cheers,
Martin



--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ 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 [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Passing function to function called by qromb etc.?
Next Topic: Passing function to function called by qromb etc.?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 17:44:32 PST 2025

Total time taken to generate the page: 1.60126 seconds