[fpc-pascal] How to split file of whitespace separated numbers?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Dec 23 18:46:22 CET 2016

On 2016-12-23 13:06, Sven Barth wrote:
> Regular expressions usually have a higher overhead 

That is not always a given.

I remember years back we had a similar discussion, but then about syntax
highlighting large code units. eg: The the large OSX related unit in FPC
(can't remember how many MB's in size it was). Lazarus performed okay
syntax highlighting that, but other editors didn't. Everybody was told
that Lazarus did so well, because it "understood the code and syntax".
jEdit, a Java based editor, implements all it's syntax highlighting
(100's of them) all via regex. jEdit was extremely fast, even on that
very large OSX related unit. Even when you jump from the beginning of
the file straight to the end.

For many other things, plain code could be faster, but often a lot more
effort and time consuming to implement. Where as you could have written
a regex expression in under 10 seconds and accomplish the same task 8
lines of code or less - very little effort required.


fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

My public PGP key:  http://tinyurl.com/graeme-pgp

More information about the fpc-pascal mailing list