Status: offline
Registered: 06/24/2008
Posts: 2
|
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 *imagelistbeginimagelist = "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!
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Be sure you are declaring the task to have parameters, i.e.[code:1:1839789cba]task testm = /path/testm.clAND NOTtask $testm = /path/testm.cl[/code:1:1839789cba]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
|