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

Home » Public Forums » archive » Re: resizing system variable
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: resizing system variable [message #82577 is a reply to message #82574] Thu, 20 December 2012 12:28 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, December 20, 2012 2:38:00 PM UTC-5, Bob Plano wrote:
> My apologies if this has been answered elsewhere, or if the answer is
>
> obvious, but...
>
>
>
> I use defsysv to define an array. Later on, I want to set that system
>
> variable equal to an array of another size, but I get an error message
>
> that the system variable and second array are conflicting data
>
> structures:
>
>
>
> pro one
>
> defsysv,'!var',fltarr(10)
>
> !var= findgen(20) ;this gives an error.
> end
>
>
>
> I've tried setting !var=!null, but I get an error message to the
> effect the !null is undefined. Which is true, in a way, of course.
>
> Does anyone know of a fix for this? Could I define !var as a pointer,
> which could point at one or another array?

You can only set the dimensions of a system variable once, the first time you initialize it. You can get around it using a pointer.

It sounds to me you are trying to use a system variable like a common block (i.e. global variable). See if you an rethink how you do it without a system variable, because it will probably come back to bite you.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Get values from one image according to pixel locations of maxima on another image
Next Topic: DejaVuSans Font and the Sun Symbol

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

Current Time: Sun Oct 12 05:11:30 PDT 2025

Total time taken to generate the page: 0.72864 seconds