In message <[EMAIL PROTECTED]>, MAJ
Programming <[EMAIL PROTECTED]> writes
No offense but what does PRINT ON have to do with PRINTER ON/OFF. They're
sorta unrelated.
But using PRINT ON means you don't need to use PRINTER ON/OFF
Most of my programming always sent reports to print unit 1. That way,
whether I used CRT or PRINT was totally irrelevant - they both ALWAYS
went to the terminal.
I have an issue with the code having PRINTER ON ; PRINT SOMETHING then
PRINTER OFF in the body of what is assumed to be a loop. It was replying to
someone's report request.
As I say, if the user had used PRINT ON 1 SOMETHING, then the PRINTER ON
; PRINTER OFF lines could just have been deleted *completely* as
redundant.
(Only thing is, it was then wise to finish the program with PRINTER
CLOSE ON 1 otherwise your users would be saying "where's my print job?"
Still stuck in the queue as "pending and open" :-)
Oh - and another big advantage for PRINT ON 1 - we had a very obscure
bug where output to terminal would occasionally just die, and it was in
the system for several years! I eventually discovered the cause - a
report program did PRINTER ON at the start, PRINTER OFF at the end, and
there was some obscure circumstance where it could exit without falling
off the bottom of the code and executing the PRINTER OFF. We knew that
was what was happening, because when the printout did appear it had all
this crud at the end, but we just couldn't work out HOW it was
happening. Especially as the users were dire at telling us what they'd
done to cause it :-) Actually, I might have discovered and fixed the bug
at the same time as I converted it to PRINT ON 1 to fix the problem ...
Cheers,
Wol
----- Original Message -----
From: "Anthony W. Youngman" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Tuesday, March 13, 2007 4:45 AM
Subject: Re: [U2] Reports In Universe BASIC
In message <[EMAIL PROTECTED]>, MAJ
Programming <[EMAIL PROTECTED]> writes
>Here we go with the wide variety of 'examples'.
>
>What is the sanity of PRINTER ON, then PRINT then PRINTER OFF?
>
>Should we not be teaching PRINTER ON once and PRINTER OFF at the end?
>
>I've only seen the redundant PRINTER ON, then PRINT then PRINTER OFF when
>the programmer didn't know of CRT and was providing some PRINT @(x,y):ID
>running dialog.
Or what I sometimes did (especially useful when creating two or three
reports from a single pass through a file...)
PRINT ON 1 ...
That was quite often used to generate a full report, summary, and stats,
all in one pass.
Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The
man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source
Pick
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/