Path: utzoo!utgpu!water!watmath!clyde!att!cbnews!mdk
From: mdk@cbnews.ATT.COM (Shadow)
Newsgroups: comp.sys.m6809
Subject: I keep getting a device error
Keywords: OS9 COCO
Message-ID: <674@cbnews.ATT.COM>
Date: 16 Jul 88 21:06:33 GMT
Reply-To: mdk@cbnews.ATT.COM (Shadow)
Distribution: na
Organization: U.N.I.T. (United Nations Intelligence Taskforce)
Lines: 36



Recently I tried to write a little basic09 program to spool print a letter
I was writing to my family.  It was a pretty simple program,  I passed it the
path to the file, and the number of copies I wanted printed and it would print
that number of copies.  However, it ran through the first iteration and
returned a device
not ready error.  I used a for loop to count the number of iterations and the 
shell command to list the file to the printer.  My question is this, can 
I use the close statement after printing the file without using an open
statement before I run the shell command.  Should I do something like:

for i = 1 to count
shell ("list " file ">" #printer)
close #printer
i=i + 1
next i

or do I need to have an open statement somewhere?  should it be before the
for loop, or should it be in the for loop?

In another area, I just got done taking a class in the UNIX(r) system shell.
(the Bourne shell).  It is pretty amazing what you can do with a shell that
is also a programming language.  I hope I can put some of this to use in
Basic09.  It's too bad we don't have something like that for OS9.

later,
Mike King
p.s. note the change in email address, we have gone to a newserver, so you
can email me there.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UUCP:..!att!cbnews!mdk1       | "What's the point in being grown-up |- The
Domain: mdk1@cbnews.ATT.COM   |  if you can't be childish at times?"| Doctor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~