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

Home » Public Forums » archive » 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 #21963 is a reply to message #21923] Tue, 03 October 2000 00:00 Go to previous message
pit is currently offline  pit
Messages: 92
Registered: January 1996
Member
brinks <h.j.brinksmeyer@physik.uni-marburg.de> writes:

>> 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 :-)

But exactly as one should expect.

Concerning temporary:
Be carefull in tight memory situations.
If you *do* run out of memory in a
a = f(temporary(a))
statement, then a is lost as in the example above!

Peter

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Dr. Peter "Pit" Suetterlin http://www.astro.uu.nl/~suetter
Sterrenkundig Instituut Utrecht
Tel.: +31 (0)30 253 5225 P.Suetterlin@astro.uu.nl
____________________________________________________________ ______________
[Message index]
 
Read Message
Read Message
Previous Topic: Complex data type
Next Topic: Kodak & RSI FAQ

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

Current Time: Tue Dec 02 15:46:16 PST 2025

Total time taken to generate the page: 1.04204 seconds