Re: String constant troubles [message #1796] |
Sun, 23 January 1994 07:02 |
gurman
Messages: 82 Registered: August 1992
|
Member |
|
|
In article <ZOWIE.94Jan22182823@daedalus.stanford.edu>,
zowie@daedalus.stanford.edu (Craig "Powderkeg" DeForest) wrote:
>
> Whenever I deal with IDL, I'm always impressed both with the completeness
> of it, and with the boneheadedness of it. Sometimes I'm struck with the
> urge to take all the programmers out back and throttle them!
>
> Here's a quote from the IDL User's Guide, p. 2-6:
>
> QUOTATION MARK (")
> The quotation mark precedes octal numbers, which are always integers,
> and delimits string constants. Example: "100B is a byte constant equal to
> 64 base 10 and "Don't drink the water" is a string constant.
>
> So far so good. They don't mention that "100B" is neither byte constant
> (possible) nor string constant (right and correct and good). Instead, it's
> a SYNTAX ERROR!
Craig -
Maybe it would be easier to bear if you got used to using single '
characters to delimit your string constants (except when they have
apostrophes
in them!). IDL is perfectly happy with '100b' as a string, and even '"100b'
(although it can't convert the latter to an integer, and you probably don't
want to know what it converts the former to :).
Even in IDL, you can't have it all, all the ways, all the time. I think
I can live with it in return for the conmvenience of recognition of octal
numbers (but then again, I started using IDL in the days of RSX11-M on
PDP-11's, when hex was a foreign language used by IBM types).
Joe Gurman
--
Joseph B. Gurman / NASA Goddard Space Flight Center/ Solar Data Analysis
Center / Code 682 / Greenbelt MD 20771 USA / gurman@uvsp.gsfc.nasa.gov
| Federal employees are still prohibited from holding opinions while at |
| work. Any opinions expressed herein must therefore be someone else's. |
|
|
|