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

Home » Public Forums » archive » Re: CALL_EXTERNAL simple problem ?
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: CALL_EXTERNAL simple problem ? [message #28067 is a reply to message #27975] Thu, 15 November 2001 06:51 Go to previous message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
On 15 Nov 2001, trouble wrote:

[snip]

> Yes - this works! It seems that IDL (on my platform only?) needs C
> functions to have the (argc,*agrv[]) form, despite examples in the
> manual to the contrary. However, now I understand.

Glad it works... but which manuals are you using? All platforms I can
think of would require such a construct to pass IDL variables into C.
Moreover, all of the examples I can find in chapter 7 of the IDL 5.3
External Development Guide (EDG) show the C routines to have the form:

function_name (int argc, void* argv[])

where:

'argc' is the argument counter (i.e. the number of arguments including the
name of the call itself)

'argv' is the argument vector which is an array of pointers to the passed
IDL variables, which are accessible via argv[0] ... argv[argc-1]. Note
that argv has one additional element, argv[argc] which is always a null
pointer. You should be very careful to appropriately define your C
variables so they match the size/structure of the internal IDL variables
(defined in export.h). If you have a mismatch in the size of your
variables, you will corrupt your IDL session.

The real 'root' of the (argc, argv) construction likely arises from the
way that a stand-alone C/Fortran program accept simple command-line
arguments.

Cheers,
Randall
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: PlotS and symbol characteristics
Next Topic: 16-bit colors in Linux (Re: 24 bit colors in IDL)

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

Current Time: Sat Apr 25 16:54:03 PDT 2026

Total time taken to generate the page: 1.43936 seconds