Welcome to iraf.net Thursday, May 02 2024 @ 04:14 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 question on simple programming
   
Anonymous: Guest
 07/24/2006 08:20PM (Read 6447 times)  



Dear IRAF support,I'd like to as a question about how to make the simple script working.
I supply the next script to the "cl" :cl> cl < a.clwhere a.cl is the following:
---- cat a.cl ---
apscatter @objects.list out=@obj.list refer=bs
hselect @objects.list $I,APSCATTE yes
---- end of a.cl ---The first string works well, but the next one, actually any next
string, doesn't want to start up. What's wrong here?Best wishes,

 
 Quote
fitz
 07/24/2006 08:20PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Is the first APSCATTER supposed to be interactive? Redirected CL scripts like this take ALL input from the redirection, so an apscatter task prompt would actually be reading the next line in the a.cl file, not the keyboard.-Mike

 
Profile Email
 Quote
dmbiz
 07/24/2006 08:20PM  
+----
Newbie

Status: offline


Registered: 07/24/2006
Posts: 2
Hi Mike, thank you for the answer,yes, APSCATTER has to be interactive here. Can I do anything in this case to run more tasks in this script?Dmitry

 
Profile Email
 Quote
fitz
 07/24/2006 08:20PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try the "compute mode" syntax, i.e. apscatter ("@foo", out="@bar", ....)
next_task ("@foo", ....)-Mike

 
Profile Email
 Quote
dmbiz
 07/24/2006 08:20PM  
+----
Newbie

Status: offline


Registered: 07/24/2006
Posts: 2
Hi, I tried the following sequence but it doesn't work when [i:1528ba711c]apscatter [/i:1528ba711c] runs in interactive mode; it stops once the first line is done.apscatter ("foo1", out="bar1", refer="foobar")
apscatter ("foo2", out="bar2", refer="foobar")
next_task ("foo", ....)

 
Profile Email
 Quote
fitz
 07/24/2006 08:20PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Then does your work with APSCATTER require a response to a prompt or is it just cursor mode commands? For example, an input file like[code]implot dev$pix
q[/quote]run as "cl < foo" will work and see the 'q' as an invalid command once you normally quit the implot from the cursor mode. However, a task that prompts the user and reads from the stdin will read the next line of the re-directed file (I can post an example if needed).Anyway, the best all-around method is to just make this a procedure script and run it as a regular task.-Mike

 
Profile Email
 Quote
   
Content generated in: 0.18 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