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  |
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!
|
|
|