|
Re: the type parser [message #44471 is a reply to message #44075] |
Thu, 16 June 2005 06:04  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
m_schellens@hotmail.com wrote:
> Thats a different issue:
> In an *expression*, IDL always converts the lower to the higher type in
> this order:
> STRING<BYTE<(INT|UINT)<(LONG|ULONG)<(LONG64|ULONG64)<FLOAT <DOUBLE<COMPLEX<COMPLEXDBL
> before evaluation.
> Before we were taking about reading a string and determining the type
> (for storing it appropriately).
> Note that for proper conversion one of the types has to have the proper
> type beforehand:
> IDL> print,'1.23' gt '2e-10'
> 0
> IDL> print,1.23 gt 2e-10
> 1
> but:
> IDL> print,1 gt '2e-10'
> 0
>
> Cheers,
> marc
>
You are right,
I missed this test.
cheers
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
Re: the type parser [message #44480 is a reply to message #44075] |
Wed, 15 June 2005 12:01  |
marc schellens[1]
Messages: 183 Registered: January 2000
|
Senior Member |
|
|
Thats a different issue:
In an *expression*, IDL always converts the lower to the higher type in
this order:
STRING<BYTE<(INT|UINT)<(LONG|ULONG)<(LONG64|ULONG64)<FLOAT <DOUBLE<COMPLEX<COMPLEXDBL
before evaluation.
Before we were taking about reading a string and determining the type
(for storing it appropriately).
Note that for proper conversion one of the types has to have the proper
type beforehand:
IDL> print,'1.23' gt '2e-10'
0
IDL> print,1.23 gt 2e-10
1
but:
IDL> print,1 gt '2e-10'
0
Cheers,
marc
|
|
|
|