fscan difficulty, please help
rrhine wrote on Jun 24, 2008
Hi all,
I have been having a lot of frustration with fscan, and despite others postings, I cannot get it to work.
Here is my code:
-----------------------------------
procedure testm()
string s1, s2, s3
struct *imagelist
begin
imagelist = "Structure.lis"
while (fscan (imagelist, s1, s2, s3) != EOF) {
print (s1 , " " , s2 , " " , s3) ;}
end
-------------------------------------
When I run testm, IRAF asks me to input a value for imagelist; it doesn't seem to be able to read from Structure.lis (I made sure it is in the directory).
I realize that imagelist needs to have a '*' before it so that it will be considered to be accessing a list file, so I'm not sure whats wrong.
Thanks!
I have been having a lot of frustration with fscan, and despite others postings, I cannot get it to work.
Here is my code:
-----------------------------------
procedure testm()
string s1, s2, s3
struct *imagelist
begin
imagelist = "Structure.lis"
while (fscan (imagelist, s1, s2, s3) != EOF) {
print (s1 , " " , s2 , " " , s3) ;}
end
-------------------------------------
When I run testm, IRAF asks me to input a value for imagelist; it doesn't seem to be able to read from Structure.lis (I made sure it is in the directory).
I realize that imagelist needs to have a '*' before it so that it will be considered to be accessing a list file, so I'm not sure whats wrong.
Thanks!
Mike Fitzpatrick wrote on Jun 24, 2008
Be sure you are declaring the task to have parameters, i.e.
The first declaration works for me, the second prompts me for imagelist. A '$' in the declaration means the task has no parameters, however any variable declared before the 'begin' statement are considered parameters.
Cheers,
-Mike
task testm = /path/testm.cl
AND NOT
task $testm = /path/testm.clThe first declaration works for me, the second prompts me for imagelist. A '$' in the declaration means the task has no parameters, however any variable declared before the 'begin' statement are considered parameters.
Cheers,
-Mike
rrhine wrote on Jun 24, 2008
That explains everything! Thanks!
Last post on Jun 24, 2008