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

Home » Public Forums » archive » Odd string/index problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Odd string/index problem [message #21767 is a reply to message #21685] Thu, 14 September 2000 00:00 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
wmc@bas.ac.uk wrote:
>
> marc <m_schellens@hotmail.com> wrote:
>> wmc@bas.ac.uk wrote:
>>> wmc> a='stoat'
>>> wmc> print,a([0]),'>'
>>> stoat
>>>>
>>> wmc> print,a(0),'>'
>>> stoat>
>
>> This is because your i is an array, while i[0] is a scalar.
>> therefore strings(i) is a string array, while strings(i[0]) is a scalar.
>
>> after printing an array, IDL always starts a new line
>
> OK, its an array, but is it acceptable that IDL always starts a new line
> after printing an array? Whats the justification for that?
>

IDL> a = [ 1,2,4,7,11 ]
IDL> b = [ 2.0,3.7,4.0 ]
IDL> c = [ 2,6,4,9,4,2,7 ]
IDL> print, a, b, c, FORMAT = '( 5i5,3f7.3,7i5 )'
1 2 4 7 11 2.000 3.700 4.000 2 6 4 9
4 2 7
IDL> print, a, b, c
1 2 4 7 11
2.00000 3.70000 4.00000
2 6 4 9 4 2 7

Well, I gotta tell you, I prefer the default option.

I print out full arrays more often than single elements (or single
element arrays). If the first example was the default it would be pretty
annoying don't you reckon?

paulv

--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Odd string/index problem
Next Topic: Re: Convolution of Stick Spectra

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

Current Time: Sat Oct 11 15:12:56 PDT 2025

Total time taken to generate the page: 1.03982 seconds