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

Home » Public Forums » archive » Re: A simple DLM question
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: A simple DLM question [message #81213] Wed, 29 August 2012 11:16 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 8/29/12 11:50 AM, Chris Torrence wrote:
> On Wednesday, August 29, 2012 11:31:39 AM UTC-6, fawltyl...@gmail.com wrote:
>>
>> A '-' can be both unary (-3) and binary (a-3). Including the '-' in the constant would be erroneous in the binary case and you would get a syntax error.
>>
>> There is a similar feature (or bug?) in parsing the exponent of floating point literals. IDL accepts 1e- as a valid float number:
>>
>> IDL> help, 1e-
>> <Expression> FLOAT = 1.00000
>>
>> But this results in a syntax error for expressions like 1e-a:
>>
>> IDL> a=0 & help, 1e-a
>>
>> a=0 & help, 1e-a
>> ^
>> % Syntax error.
>>
>> (I think 1e- should be invalid and 1e-a should be valid.)
>>
>> regards,
>> Lajos
>
> This is the one that always drives me nuts:
> IDL> a = 3
> IDL> help,1d+a
> % Syntax error.
> IDL> help,1d + a
> <Expression> DOUBLE = 4.0000000
>
> What kind of crazy language requires spaces to work properly?!
> [Three cheers for whoever answers this question first! And IDL doesn't count...]
>
> -Chris

Python! (Although you can use tabs as long as you are consistent.)

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Tasselated Cap in IDL?
Next Topic: Re: Succinct way of testing array membership

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

Current Time: Fri Oct 10 08:33:27 PDT 2025

Total time taken to generate the page: 0.88221 seconds