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

Home » Public Forums » archive » Re: Undefined Variable: DC_Write_Fixed/DC_Write_Free - PV WAVE
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: Undefined Variable: DC_Write_Fixed/DC_Write_Free - PV WAVE [message #79684] Thu, 22 March 2012 18:52 Go to next message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Thu, 22 Mar 2012 13:30:21 -0700 (PDT), Erini Lambrides wrote:

> Hello all, I am getting this error message when i attempt to .run my
> procedure compare_target_offset2
>
> Compiled module: COMPARE_TARGET_OFFSET2.
> % Compiled module: $MAIN$.
> % DC_WRITE_FREE: Variable is undefined.
>
>
> and the same for DC_WRITE_FIXED, when I try to write my data in a
> variable to a .txt file. These two functions should be in the pv wave
> library - I have version 9.00.
>
> here is how I use it within the code:
>
> status= DC_WRITE_FREE('C:\Cryo\SphereCenterData
> \referencetargetdata.txt',rtar)
>
> I apologize now if it's a silly mistake. Thanks!

In PV-Wave DC_WRITE_FREE generates such an error message, when there
is an undefined variable in the parameters. Are you sure, that you
assigned any value to rtar? Can you include the statement "info,rtar"
before calling DC_WRITE_FREE to see if it is defined or undefined?

HTH, Heinz
Re: Undefined Variable: DC_Write_Fixed/DC_Write_Free - PV WAVE [message #79689 is a reply to message #79684] Thu, 22 March 2012 13:38 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> Erini Lambrides writes:
>
>> Hello all, I am getting this error message when i attempt to .run my
>> procedure compare_target_offset2
>>
>> Compiled module: COMPARE_TARGET_OFFSET2.
>> % Compiled module: $MAIN$.
>> % DC_WRITE_FREE: Variable is undefined.
>>
>>
>> and the same for DC_WRITE_FIXED, when I try to write my data in a
>> variable to a .txt file. These two functions should be in the pv wave
>> library - I have version 9.00.
>>
>> here is how I use it within the code:
>>
>> status= DC_WRITE_FREE('C:\Cryo\SphereCenterData
>> \referencetargetdata.txt',rtar)
>>
>> I apologize now if it's a silly mistake. Thanks!
>
> I don't know if this is a "silly" mistake, but it
> is certainly not an uncommon one. The directory that
> contains these two functions is simply not on your
> IDL path. (You can print the directories on your
> IDL path to confirm this for yourself.)
>
> I think if you add the directory to your IDL path,
> and restart IDL, you will find that things work
> a LOT better. :-)

Whoops! I meant PV-Wave, of course, not IDL. And,
also, my remarks assume DC_WRITE_FREE and DC_WRITE_FIXED
are functions, as you have called them here, and not
procedures, which would also cause an error message
like this.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Undefined Variable: DC_Write_Fixed/DC_Write_Free - PV WAVE [message #79690 is a reply to message #79689] Thu, 22 March 2012 13:34 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Erini Lambrides writes:

> Hello all, I am getting this error message when i attempt to .run my
> procedure compare_target_offset2
>
> Compiled module: COMPARE_TARGET_OFFSET2.
> % Compiled module: $MAIN$.
> % DC_WRITE_FREE: Variable is undefined.
>
>
> and the same for DC_WRITE_FIXED, when I try to write my data in a
> variable to a .txt file. These two functions should be in the pv wave
> library - I have version 9.00.
>
> here is how I use it within the code:
>
> status= DC_WRITE_FREE('C:\Cryo\SphereCenterData
> \referencetargetdata.txt',rtar)
>
> I apologize now if it's a silly mistake. Thanks!

I don't know if this is a "silly" mistake, but it
is certainly not an uncommon one. The directory that
contains these two functions is simply not on your
IDL path. (You can print the directories on your
IDL path to confirm this for yourself.)

I think if you add the directory to your IDL path,
and restart IDL, you will find that things work
a LOT better. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Undefined Variable: DC_Write_Fixed/DC_Write_Free - PV WAVE [message #79713 is a reply to message #79684] Tue, 27 March 2012 10:43 Go to previous message
Erini Lambrides is currently offline  Erini Lambrides
Messages: 6
Registered: March 2012
Junior Member
On Mar 22, 9:52 pm, Heinz Stege <public.215....@arcor.de> wrote:
> On Thu, 22 Mar 2012 13:30:21 -0700 (PDT),EriniLambrideswrote:
>> Hello all, I am getting this error message when i attempt to .run my
>> procedure compare_target_offset2
>
>> Compiled module: COMPARE_TARGET_OFFSET2.
>> % Compiled module: $MAIN$.
>> % DC_WRITE_FREE: Variable is undefined.
>
>> and the same for DC_WRITE_FIXED, when I try to write my data in a
>> variable to a .txt file. These two functions should be in the pv wave
>> library - I have version 9.00.
>
>> here is how I use it within the code:
>
>> status= DC_WRITE_FREE('C:\Cryo\SphereCenterData
>> \referencetargetdata.txt',rtar)
>
>> I apologize now if it's a silly mistake. Thanks!
>
> In PV-Wave DC_WRITE_FREE generates such an error message, when there
> is an undefined variable in the parameters. Are you sure, that you
> assigned any value to rtar? Can you include the statement "info,rtar"
> before calling DC_WRITE_FREE to see if it is defined or undefined?
>
> HTH, Heinz

Heinz, My mistake was along the lines of what you said, in the end
rtar was undefined. So that problem fixed. Now when I try to format
the file, I get this error message:

% Internal error: Attempt to store into Temp variable with dynamic
allocation..
% Execution halted at COMPARE_TARGET_OFFSET2 <C:\wave_bin\pvpro
\elam_pro/compare_target_offset2.pro( 80)> (DC_WRITE_FREE).
% Called from $MAIN$ .

Right after the loop finishes its first iteration. This is the code:


loop4:
artar=fltarr(nfiles)
axc=fltarr(nfiles)
ayc=fltarr(nfiles)

for i=0, nfiles-1 do begin

spherecenter,aimg(*,*,1),rtar,xc,yc,1,1
artar(i)=rtar
axc(i)=xc
ayc(i)=yc

status= DC_WRITE_FREE('C:\Cryo\SphereCenterData
\referencetargetdata.txt',fnames(i),artar(i),/Column, $
Dt_Template=[1], Format="(A10, 1X, F4.2)")

endfor

fnames(i): String=Array(5)
artar(i):Float=Array(5)

Thanks!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Why Map Ojbects Was: Cannot see anything in the postscript file. Any help?
Next Topic: Re: An optimisation question

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

Current Time: Wed Oct 08 09:14:29 PDT 2025

Total time taken to generate the page: 0.00551 seconds