• Subject: RE: Print file problem
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 03 May 01 09:18:50 +1000

H
Hello Bob,

You wrote:
>I only use C for system level stuff and am ashamed to say that I have never
>actually printed a report with it.  I would caution you that you may suffer
>performance issues by trapping exception messages.  It is fairly expensive
>for the system to throw an error.

I thought much the same when I initially read Jevgeni's message but then I 
thought the exception only occurs at page-overflow versus the alternative of an 
IF test on every write.  I suspect in this case the performance penalty is 
negligible -- although a test-case from an interested party might be 
informative 
:)

I also suspect that RPG is monitoring the message to set on the overflow 
indicator rather than counting lines and feel that using a similar process in 
your own code is acceptable.

My guideline for even worrying about exceptions is the old 80/20 rule.  If 80% 
of 
given operations could get an exception then check before-hand otherwise just 
catch the exception.  The real choice comes down to which method results in the 
cleanest code.

Regards,
Simon Coulter.


 FlyByNight Software         AS/400 Technical Specialists       
 Eclipse the competition - run your business on an IBM AS/400.  
                                                                
 Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\   
 Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /   
                                                           X    
               ASCII Ribbon campaign against HTML E-Mail  / \   

+---
| This is the C/400 Mailing List!
| To submit a new message, send your mail to C400-L@midrange.com.
| To subscribe to this list send email to C400-L-SUB@midrange.com.
| To unsubscribe from this list send email to C400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: bob@cstoneindy.com
+---

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].