Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
It's a bug. The current IDL compiler doesn't check for a matching pair of ""'s, but just sees the first " followed by a number and immediately interprets it as an octal number instead. Wonder if they'll fix this in IDL Version 5? Is there a list of the bug fixes they are doing for version 5, or is there just the glossy flyer about all the new features? Tim R. Bauer wrote: > > 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. > > -- > R.Bauer > > Institut fuer Stratosphaerische Chemie (ICG-1) > Forschungszentrum Juelich > email: R.Bauer@kfa-juelich.de -- http://condor.lpl.arizona.edu/~tim/
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 -----------------------------------------------------------