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

Home » Public Forums » archive » Re: the difference between ' and "
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: the difference between ' and " [message #8229 is a reply to message #8228] Mon, 17 February 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
R. Bauer <r.bauer@kfa-juelich.de> writes:

> I found that's there is a difference for using ' or " to sign numbers as
> strings.
>
> IDL> a='1'
> IDL> a="1"
>
> a="1"
> ^
> % Syntax error.
>
> The users guide said that both ' and " have the same useabilty.
>
> It's not true.

IDL has trouble with a="1" because it thinks you are trying
to make the variable "a" the octal value 1. In other words,

a = "1

This is a result of using the same alphanumeric characters
to designate octal and hexadecimal number as for the quote
characters.

If you weren't trying to make strings of numbers, whether
you used single or double quotes wouldn't matter. At least
as long as you use them consistently. :-)

Cheers!

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
[Message index]
 
Read Message
Read Message
Previous Topic: Financial Aid
Next Topic: the difference between ' and "

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

Current Time: Mon Dec 01 00:22:43 PST 2025

Total time taken to generate the page: 1.76787 seconds