[fpc-devel] low level function for pascal language
L505
fpc505 at z505.com
Fri Jul 1 23:25:43 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.
If there is already a way to do this, at least I know my way around the FPC low
level string sources a bit more now.
More information about the fpc-devel
mailing list