From: "Dave Guyer"
Perhaps more efficient at finding if there are any lines longer than
80 char, but it fails to meet my spec in that it gives no feedback
that I can give to the programmer as to which lines fail the test.
It would always stop at the first line found, and there would be no
indication of other lines further down the file.
George's solution gives me a compressed view of the lines found with
the line numbers.
> It's a good looking solution to the problem. However I think it
> might NOT be the most efficient way to do it. I believe SAL uses
> a Pascal style of string structure, i.e. the string length is
> stored in the structure. So it should be more efficient to use
> CurrLineLen() rather than lFind(). Something like this should
> do the same job(it's longer but it might execute faster):
>
> proc FindLong()
> BegFile()
> while (CurrLineLen() < 80)
> if (NOT down())
> warn("EOF reached, no line > 80 chars!")
> endif
> endwhile
> end
>
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|