[fpc-pascal] Readline substitute

Johann Glaser Johann.Glaser at gmx.at
Sat Dec 10 22:04:54 CET 2011


Hi Bernd!

Am Donnerstag, den 08.12.2011, 20:44 +0100 schrieb Bernd:
> 2011/5/1 Johann Glaser <Johann.Glaser at gmx.at>:
> 
> > If you find any improvements or comments don't hesitate to send me an
> > EMail.
> 
> I just used it. I only needed readline() and add_history(), these two
> functions are already enough to make a ReadLn() substitute that really
> works and It works like a charm! Thank you!
> 
> I think this code really deserves to be included in FPC.

Thanks for your feedback and support!

In the meantime I've added an OOP wrapper which greatly simplifies the
usage of the history and readline and helps to implement custom
completion.

Please find attached the OOP wrappers and a small example.

I've also used this OOP wrapper for a command line tool which integrates
the TCL OOP wrapper (mentioned in this list on 2011-05-05). The
completion correctly identifies whether it is asked for commands or
variables, and even works inside of the TCL equivalent of backticks. Due
to shortage of time it's still a bit messy, but will be released under
the terms of the GPL too.

Bye
  Hansi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: historyoop.pas
Type: text/x-pascal
Size: 3777 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111210/1eba690a/attachment.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readlineoop.pas
Type: text/x-pascal
Size: 10595 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111210/1eba690a/attachment-0001.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ootest.pas
Type: text/x-pascal
Size: 2011 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111210/1eba690a/attachment-0002.pas>


More information about the fpc-pascal mailing list