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 #81223 is a reply to message #81218] Tue, 28 August 2012 22:03 Go to previous messageGo to previous message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Maybe it's a bug! Anyway, Jimmy's trick did it, but I'm still confused by IDL's EDG.

On Tuesday, August 28, 2012 8:10:17 PM UTC-5, Craig Markwardt wrote:
> On Tuesday, August 28, 2012 5:16:53 PM UTC-4, Xin Tao wrote:
>
>> I did check the flags of IDL_V_CONST and IDL_V_TEMP. Both failed, and then I posted the question. For example, I'm not sure how to explain this results.
>
>>
>
>>
>
>>
>
>> // Code here.
>
>>
>
>>
>
>>
>
>> void simple(int argc, IDL_VPTR argv[])
>
>>
>
>> {
>
>>
>
>> IDL_VPTR v;
>
>>
>
>>
>
>>
>
>> v = IDL_BasicTypeConversion(1, &argv[0], IDL_TYP_DOUBLE);
>
>>
>
>>
>
>>
>
>> printf("const = %d\n", v->flags & IDL_V_CONST);
>
>>
>
>> printf("temp = %d\n", v->flags & IDL_V_TEMP);
>
>>
>
>>
>
>>
>
>> if (v != argv[0]) IDL_DELTMP(v);
>
>>
>
>> }
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> Now results:
>
>>
>
>>
>
>>
>
>> IDL> simple, 3.0d
>
>>
>
>> const = 1
>
>>
>
>> temp = 0
>
>>
>
>> IDL> simple, -3.0d
>
>>
>
>> const = 0
>
>>
>
>> temp = 2
>
>
>
> It is a little odd, but it may be the difference between 3.0d, a constant, and -(3.0d), which is an expression. But I'd think that IDL should be smart enough to parse -3.0d as a constant.
>
>
>
> Craig
[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 16:26:12 PDT 2025

Total time taken to generate the page: 1.03907 seconds