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 #81216 is a reply to message #81215] Wed, 29 August 2012 10:31 Go to previous messageGo to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, August 29, 2012 6:23:51 PM UTC+2, Xin Tao wrote:

> That's very clear explanation, thanks. But I would still say that it's not very intuitive to me that 3 is a constant but -3 is not.

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
[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: Sat Oct 11 15:28:57 PDT 2025

Total time taken to generate the page: 2.40080 seconds