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

Home » Public Forums » archive » Re: what's wrong with this? --- ' vs " 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: what's wrong with this? --- ' vs " problem [message #39227 is a reply to message #39224] Tue, 04 May 2004 07:54 Go to previous messageGo to previous message
mmiller3 is currently offline  mmiller3
Messages: 81
Registered: January 2002
Member
>>>> > "David" == David Fanning <david@dfanning.com> writes:

> Michael A. Miller writes:
>> Ok, this I don"t get. Is it a 'feature' or a "bug"? I
>> vote for bug in how IDL parses octal numbers.

> Well, if it's a bug, it's been a bug for the last 20
> years. :-)

That's what I thought. And I can't for the life of me figure out
why it took so many years for me to notice it! Blech.

I did find some documentation in chapter 3 of "Building IDL
Applications", but there is more. In talking to my neighbors
about this, it was pointed out that the final ' or " is not
required to correctly delimit a string, so that all of the
following are the same string constant:

"Don't drink the water"
"Don't drink the water
'Don''t drink the water'
'Don''t drink the water

I could happily go along being unaware of this, except I wrote a
script that calls some IDL like this

echo indypet_projections, \"$img\" > do_this.pro
echo exit >> do_this.pro
idl do_this.pro > do_this.log 2>&1

sometimes this fails, depending on what the string in img is. So
I fixed it by replacing the "s with 's. But I'm not yet
convinced that I won't have cases where I need to use " to
delimit some string and ' to delimit others. So I wonder if I
need to write an IDL-like parser that can decide in advance how
to delimit strings so that IDL likes them. Of course if IDL had
a built-in mechanism for handling command line arguments, I could
let the RSI gang do that for me...

None of this fits my bias about how IDL is supposed to work,
which is exactly like I want it to that is ... I'm grudgingly
willing to count as a feature :-)

Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fortran call_external for 2D arrays
Next Topic: Re: Announcing GDL 0.8, now with netCDF support

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

Current Time: Sat Oct 11 07:01:53 PDT 2025

Total time taken to generate the page: 1.36036 seconds