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

Home » Public Forums » archive » A simple DLM question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
A simple DLM question [message #81248] Mon, 27 August 2012 10:13
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Hi,

I'm having trouble figuring out the problem of the following DLM code:

/* The c routine */

void simple(int argc, IDL_VPTR argv[])
{
IDL_VPTR v;

v = IDL_BasicTypeConversion(1, &argv[0], IDL_TYP_DOUBLE);

IDL_DELTMP(v);
}

This routine just takes its input and convert it to double. After converting it to a DLM, however, I seem to see strange results.

IDL> simple, 1.0d
% Loaded DLM: TESTMODULE.
IDL> simple, -1.0d
Bus error

That is: if I give it 1.0d as input, then the code is fine. However, if I use -1.0d, then there is a BUS error, presumably from IDL_DELTMP(v). I really don't understand why this is the case. Isn't IDL_DELTMP supposed to decide first whether v is a temporary variable or not? If I remove IDL_DELTMP, of course, I'll frequently get the annoying warning message "% Temporary variables are still checked out - cleaning up...".

Please give me some help. Thanks.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: image interplate and overlay lat/lon?
Next Topic: MPFITFUN problem

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

Current Time: Wed Oct 08 17:01:15 PDT 2025

Total time taken to generate the page: 0.00395 seconds