Re: [fpc-pascal] Read lines into UnicodeString variable from UCS2 (UTF-16) encoded text file

2019-09-15 Thread DougC
Hajny <mailto:xhaj...@hajny.biz> wrote On 2019-09-16 00:29, DougC wrote: > But to fully correct the situation, I would also change it to a > procedure since leaving it as a function still suggests it only > returns a result and has no other side effects. No, changing it

Re: [fpc-pascal] Read lines into UnicodeString variable from UCS2 (UTF-16) encoded text file

2019-09-15 Thread DougC
Tomas- Thanks for pursuing this! Generally a good approach. I do not like item 3 in that the function, as described, is named DetectUtfBom but does more than detect. Side effects of functions are generally not good. I would at least rename it something like DetectAndHandleUtfBom. But to

Re: [fpc-pascal] Illegal counter variable?

2019-09-11 Thread DougC
Actually, the original code used two VARs, not typed CONST. One VAR was initialized and one was not. I think this is a bug and should be fixed. As Jonas already pointed out: "var i : longint = 0;" is internally handled using the same code path as "const i : longint = 0", and typed constants

Re: [fpc-pascal] Illegal counter variable?

2019-09-09 Thread DougC
The last messages have wandered off topic somewhat. Can we stick to the original request, which was why the handling of the two declarations differed? Doug C.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Very vague gettickcount64 description?

2019-09-06 Thread DougC
If intentionally vague then that fact should be included in the description along with the reason! On Fri, 06 Sep 2019 10:06:24 -0400 Tomas Hajny wrote On 2019-09-03 15:27, Paulo Costa wrote: > While consulting the online reference about gettickcount >

Re: [fpc-pascal] Feature announcement: Generic functions, procedures and methods

2015-11-24 Thread DougC
But first fix the code so the test is correct. (The Min function is exactly the same as the Max function. Min should have A B, not A B.) On Tue, 24 Nov 2015 08:31:08 -0500 Sven Barth pascaldra...@googlemail.comwrote Am 24.11.2015 14:26 schrieb "Anthony Walter"