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

Home » Public Forums » archive » Re: Zeiger in IDL -> call by reference in I
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
Re: Zeiger in IDL -> call by reference in I [message #4240] Thu, 11 May 1995 00:00
lmudge is currently offline  lmudge
Messages: 9
Registered: October 1994
Junior Member
In article 2tq@hpl.hp.com, peter@hpl.hp.com (Peter Webb) writes:
> Karl Krieger (kak@ipp-garching.mpg.de) wrote:
> : css@ipp-garching.mpg.de writes:
>
> : >Weiss jemand, ob in IDL eine Pointeruebergabe moeglich ist,
> : >(aehnlich wie in C) ? Ansonsten sind ja staendig riesige
> : >Commonbloecke vonnoeten.
>
> : After reading this guys question (if it was possible to pass variables
> : by reference in IDL) I read the fine manual on that subject which leads
> : me to another question:
> : They state that if you pass a variable to a procedure, it is saved in a
> : temporary location. When returning from the procedure, the new parameter
> : values are copied back into the corresponding variables.
> : Does this really mean that IDL allocates new memory for each parameter
> : variable even when calling by refernce i.e. passing a pointer?
>
> It says that in the manual, but it isn't true. If you allocate big
> arrays till you run out of memory, then try passing that big array to a
> subroutine which, say, prints a single element, the call will succeed,
> indicating that the array was not copied.
>
> I guess the manual is a convoluted attempt to explain `pass by
> reference' to newbies.
>
> Peter
>
> --------------------------------
> Peter Webb, HP Labs Medical Dept
> E-Mail: peter_webb@hpl.hp.com
> Phone: (415) 813-3756

Using handles in IDL (new to version 3.6.1a) seems to be a way of passing
large arrays to subroutines by reference. Each handle has a handle id which
is a unique 32 bit longword integer allocated by IDL. My guess is that this
value is a pointer to a memory location that contains details of the variable
contained in the handle and a pointer to the memory location where the data
is stored.

Leith Mudge


------------------------------------------------------------ --------------------

lmudge@awadi.com.au
AWA Defence Industries
PO Box 161
Elizabeth SA 5112
+61 8 256 0952

Microsoft Network is prohibited from redistributing this work in any form,
in whole or in part. Copyright, Leith Mudge, 1995
License to distribute this post is available to Microsoft for $1000.
Posting without permission constitutes an agreement to these terms.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: % X windows protocol error: (BadPixmap).
Next Topic: Pixmap memory allocation question.

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

Current Time: Wed Oct 08 17:47:27 PDT 2025

Total time taken to generate the page: 0.00572 seconds