Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

fscan difficulty, please help

 
Post new topic   Reply to topic    iraf.net Forum Index -> Systems
View previous topic :: View next topic  
Author Message
rrhine



Joined: 24 Jun 2008
Posts: 2

PostPosted: Tue Jun 24, 2008 4:30 pm    Post subject: fscan difficulty, please help Reply with quote

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!
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Tue Jun 24, 2008 4:44 pm    Post subject: Reply with quote

Be sure you are declaring the task to have parameters, i.e.

Code:
task testm = /path/testm.cl

AND NOT

task $testm = /path/testm.cl


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
Back to top
View user's profile Send private message
rrhine



Joined: 24 Jun 2008
Posts: 2

PostPosted: Tue Jun 24, 2008 5:51 pm    Post subject: Reply with quote

That explains everything! Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Systems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.20 seconds