[lazarus] Two FPC questions
bukovjan at mbox.dkm.cz
Wed Sep 11 03:00:08 EDT 2002
Michael.VanCanneyt at Wisa.be wrote:
>On Tue, 10 Sep 2002, [ISO-8859-1] Sebastian G?nther wrote:
>>> Michael.VanCanneyt at wisa.be schrieb:
>>>> > FormatC can easily be implemented and added to SysUtils. If you implement
>>>> > it, I can add it.
>>> ehm... but in C, things like \t are just converted to their ASCII
>>> representation by the compiler and get stored as such in the binary. I
>>> would suggest to just add a helper function which converts strings with
>>> C-like escaped characters to a normal string, instead of writing
>>> high-level functions such as FormatC. (something like EscapeC/UnescapeC;
>>> the same could be done for other escaping schemes as well)
>I don't think this is a compiler matter, but a preprocessor matter.
>In such case it would be better to add general preprocessor support
>to lazarus or the compiler, and write some standard m4 preprocessing
>statements for this job.
>If we honor requests like this, the sky is the limit and finally code
>becomes totally unreadable as it is in C. Macroitis is a C disease,
>and should remain a C disease. So, I don't think this is a good idea.
To have a platform and language independent tab, newline etc,
representation is in fact a very good idea.
It is supported by other languagea as well, like Python or Perl - only
Pascal stands out.
Without it (or something similar), it will be virtually impossible to
maintain mutliline translations via standard gettext tools.
More information about the Lazarus