Hi,I'm having a frustrating time with fscan. Can anyone tell me why the following bit of code keeps asking me for "imagelist" when I run it? I have looked at other posts in this forum, and my task is declared correctly (i.e. without at "$", so it accepts parameters). It just won't run correctly. The code here:
works fine, but then my code doesn't work.
1:AE6403A7C1 Formatted Code
procedure fixlists
################
#
#
#
################
string imgsA
string imgsB
string imgsC
bool exp_lists {no,prompt="Do lists contain exposure times?"}
struct *imagelist
begin
#Declaration of Variables
string imname #Current image name
string litem #Current item to be added to list
string listname #Name of current list
string x #Strings internal to fscan.
real y
imagelist = imgsA
#Initialize specifice variables
listname='temp.list'
if(exp_lists) {
#Strip exposure times from flat fields
if(access(listname)){delete(listname)}
imagelist = imgsA
while(fscan(imagelist,x,y)!=EOF) {
imname=x
printf("%s \n",x,>>listname)
;
}
copy(listname,imgsA)
if(access(listname)){delete(listname)}
} else {
if(access(listname)) { delete(listname) }
imagelist = imgsB
while(fscan(imagelist,x)!=EOF) {
imname=x
litem=imname//" "//defexptm
printf("%s \n",litem,>>listname)
;
}
copy(listname,imgsB)
if(access(listname)){delete(listname)}
imagelist=imgsC
while(fscan(imagelist,x)!=EOF) {
imname=x
litem=imname//" "//defexptm
printf("%s \n",litem,>>listname)
;
}
copy(listname,imgsC)
if(access(listname)){delete(listname)}
}
end[/code:1:ae6403a7c1]
Thanks so much for any help!
Alex