[fpc-devel] low level function for pascal language

Peter Vreman peter at freepascal.org
Fri Jul 1 22:36:18 CEST 2005


> While working on some functions in the strwrap1.zip package I am
> upgrading, I
> have found the need for a new low level function I think.
>
> Something similar to
>   ReadLn(F,Line)
>
> This one is slightly different:
>   PassLn(F)
>
> Instead of reading the line, copying the text the line into a Line var,
> the
> PassLn function just passes by the line and sets the pointer up at the
> beginning
> of the next line. No copying of the string. This way you can skip copying
> the
> text of the line, and move on to the next one directly.
>
> I have made a whole bunch of patches to my Fpc sources and recompiled a
> lot of
> units, and have got a PassLn function working today :) All the error
> messages
> and some low level units needed slight modification (i.e.
> _readln_passln_writeln
> instead of  _readln_writeln,  fpc_PassLn_End addition, etc.). But it
> wasn't so
> bad really.
>
> Now the question I have is: does Pascal already have a function like this?
> I
> definitely need a function like this for some ideas I have with strwrap1
> package.

SeekEoln(Text)








More information about the fpc-devel mailing list