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

Home » Public Forums » archive » Re: Dos and Donts
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: Dos and Donts [message #21899] Thu, 28 September 2000 00:00 Go to previous message
Hans J�rg Brinksmey is currently offline  Hans J�rg Brinksmey
Messages: 4
Registered: December 1998
Junior Member
"Liam E. Gumley" wrote:
> And finally, one from me. The TEMPORARY function can often be used to
> conserve memory. However it's not immediately obvious (at least it
> wasn't to me until recently) how to use TEMPORARY when extracting an
> array subset.
>
> For example, TEMPORARY saves no memory in the following example:
>
> a = dist(256)
> b = temporary(a[0:63, 0:63])
> help, a, b
> A FLOAT = Array[256, 256]
> B FLOAT = Array[64, 64]
>
> The argument a[0:63, 0:63] is passed to TEMPORARY by value, and
> therefore cannot be modified. However the following method *does* save
> memory:
>
> a = dist(256)
> b = (temporary(a))[0:63, 0:63]
> help, a, b
> A UNDEFINED = <Undefined>
> B FLOAT = Array[64, 64]

Finally, that's something new, I didn't know before!!!
Thank you very much :-)

Hans Joerg

--
H.J.Brinksmeyer - Physics Department
University of Marburg, Germany
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: new IDL mapping application
Next Topic: Re: triangulate proc

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

Current Time: Wed Oct 08 17:36:05 PDT 2025

Total time taken to generate the page: 0.00446 seconds