From: "Y.T.Lim - Ericsson"
Hi George,
> proc FindLong()
>
> lFind(format("":80:".")+"#","ixvg")
> end
>
> FindLong()
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 efficent 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
On the other hand, if SC is an optimized compiler, it might just
convert the lFind in your function to matching line length. To
match anything of n chars is exactly the same as looking for a
line of n or more chars.
While surfing the Net, I found an interesting WIn95 freeware program
called FrogBit. It features a new text processing language with an
IDE. You can develop/run/debug your program in the IDE. Once your
program is working, you can use a special runtime module to run your
program. The purpose of the program is very similar to the TSE macro.
But FrogBit's language is more English like, and it even comes with a
wizard to assist you. For those who are interested, you may find a
copy of FrogBit at http://www.nonags.com.
/Y.T.
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|