| Re: DLM's and C code [message #28721] |
Wed, 09 January 2002 15:50  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
"Richard Tyc" <richt@sbrc.umanitoba.ca> writes:
> I was thinking of IDL_Message too, but the descriptions of the 'actions'
> possible puzzled me :
> From Docs:
>
> IDL_MSG_EXIT - Use this argument to cause the IDL process to exit after the
> message is issued. This code should never be used in a system function or
> procedure - it is intended for use in other sections of the system.
>
> Is my C stub in the DLM/DLM a system function or procedure. Would this work
> or would it crash IDL? I will try it
>
> IDL_MSG_LONGJMP - It is an error to use this action code in code not called
> by the IDL interpreter since the resulting call to longjmp() will be
> invalid.
> I assume this would be my case since I am deeply nested in the DLL and not
> in the C function directly called by the interpreter.
Hi Rich--
You haven't really said what you want to do. In the first place you
said something about "cleanly returning to IDL." Well that has
several meanings.
I believe that
IDL_MSG_RET
Use this argument to make IDL_Message() return to the caller after
issuing the error message. In this case, the calling routine can
either continue or return to the interpreter as it sees fit.
is actually your best bet, because that forces a return to the calling
procedure in IDL. Then, presumably, you can have that procedure
handle the error appropriately. I think that IDL_MSG_EXIT is exactly
what you *don't* want, since there's nothing orderly about it at all.
It just shuts down IDL! Also, IDL_MSG_LONGJMP may work for you. My
interpretation of that message is that it returns to the command line
interpreter to await further commands.
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
|