Re: Strange IDL string bug [message #4818] |
Wed, 09 August 1995 00:00  |
offenbrg
Messages: 31 Registered: August 1993
|
Member |
|
|
Justin Baker <justinb@bom.gov.au> writes:
> I have discovered an unusual bug with IDL strings (IDL V4.0) and was wondering
> if anyone else has seen it.
> I quickly discovered that there seems to be a problem with " quoted strings if
> they start with a digit.
> IDL> ok_string='12345'
> IDL> bad_sting="678910" ^
> % Syntax error.
> Can anyone shed any light on this problem ?
Somewhere along the way, RSI decided to make "xxx (where xxx are digits)
stand for "This number is Octal (base 8)" as opposed to "this number is a
string."
IDL> print, '123
123
IDL> print, "123
83
123 in *octal* = 83 in *decimal*.
One nasty side effect of this, of course, is that "123" is not a string,
but an octal number with a stray " mark at the end. Also, "12ab" isn't a
string, either, but an octal number with ab" stuck at the end.
This problem pre-dates IDL 4.0, by the way.
Joel
--
"...And I am unanimous in this" - Mrs. Slocumbe
------------------------------------------------------------ ----------
| Joel D Offenberg | offenbrg@fondue.gsfc.nasa.gov |
| Hughes STX, NASA/GSFC/LASP | I get paid to stare into space. |
|
|
|