× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank goodness for the voice of reason!  <g>

Though I wonder, Henrik, why would this cost a few more cycles?  I can't
see logically how one could eat more cycles doing it this way.  But, of
course, this is not a paramount consideration.

GA

--- Henrik Krebs <hkrebs@xxxxxxxxx> wrote:
> A reason why style #1 might be preferred is that 'Do forever' is
> misinformational unless you have a veeery large file.
> 
> But I actually use style #3:
> ----- Style #3 -------------------------------------------
> 
> mykey setll record
> dou %eof
> mykey reade record
> if not %eof
> ... process ...
> endif
> enddo
> 
> because I think it's cleaner.
> Why?
> 1. First of all: Read can return either a) a record or b) an eof flag,
> and we (you) only want 'process' in case 'record'
>    You could also inside the loop have coded for both situations (select
> or if..else)
> 2. It's clean: only a single 'read' to control a 'read-loop'.  Both
> style #1 and #2 has two or three different routes through the code: zero
> records, a record read and no more records
> 3. No 'Do forever' that definately is not 'forever'
> 4. Same construction (the fewer the better) for 'read entire file'
> (except the missing setll of cause).
> 
> It might mean a few more cykles, but they are cheaper than programmer
> time
> 
> Henrik



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.