Welcome to iraf.net Sunday, May 12 2024 @ 02:53 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 fscan/struct issue?
   
ako3004
 07/09/2009 03:44AM (Read 3490 times)  
+----
Newbie

Status: offline


Registered: 07/08/2009
Posts: 2
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: https://iraf.net/phpBB2/viewtopic.php?t=87149 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

 
Profile Email
 Quote
ako3004
 07/09/2009 03:44AM  
+----
Newbie

Status: offline


Registered: 07/08/2009
Posts: 2
Never mind the above, it turns out that the lists i was looking for had gone missing. I'll have to remember to write an access in for those...Thanks,
Alex

 
Profile Email
 Quote
   
Content generated in: 0.07 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login