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"

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] 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-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] 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] 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] Last fix for RegExpr (error on empty input)

2020-02-16 Thread DougC
Yes to this idea! On Sat, 15 Feb 2020 10:31:45 -0500 Michael Van Canneyt wrote Since there are already 9 boolean properties, it may be better to introduce a Options set property and mark the others deprecated.___ fpc-pascal maillist -

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread DougC
Note that if you depend on this technique you should add a comment where the type is defined that the order of the items is significant so that someone in the future does not change the order out of ignorance!___ fpc-pascal maillist -

Re: [fpc-pascal] Writing Pascal Physics and Vectors

2021-10-15 Thread DougC via fpc-pascal
I would be helpful if you could meld this work into other Pascal-based efforts, such as the Castle Game Engine. I don't know the details of CGE but if it could use more of this type of functionality, why not make your work even more useful by connecting up with CGE? Doug C. On

Re: [fpc-pascal] Is the Lazarus list down? (2021-10-04)

2021-10-04 Thread DougC via fpc-pascal
I received the original posting and also the second direct attempt. Doug C. On Mon, 04 Oct 2021 04:36:32 -0400 Bo Berglund via fpc-pascal wrote On Mon, 04 Oct 2021 10:28:38 +0200, Bo Berglund via fpc-pascal wrote: >I have tried to

Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN

2022-01-04 Thread DougC via fpc-pascal
You can add Firefox on Windows 10 which also sees this error. Seems not to be a browser issue. If the user requests an https: connection, the website should NOT revert to a http: connection. Instead it should return an error if the https: connection cannot be made. On Tue, 04 Jan

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread DougC via fpc-pascal
So, are you saying the one cannot declare an IntToStr function with the string represented by a PChar argument? Seems pretty straightforward to me. Isn't that what is being requested? Doug C. On Wed, 12 Jan 2022 11:10:57 -0500 Sven Barth via fpc-pascal wrote DougC via

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread DougC via fpc-pascal
Alexey- You can always create such a function yourself,  gain experience using it, and share the source with us. That way others can gain experience with it and maybe someday also ask for it to be added to the standard library. Doug C. On Tue, 11 Jan 2022 10:46:24 -0500 Alexey

Re: [fpc-pascal] Bug or feature ?

2022-07-27 Thread DougC via fpc-pascal
WRITELN(F: 'Hello'); is not proper Pascal.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-29 Thread DougC via fpc-pascal
Well, this discussion has not gone well at all! I suggest that everyone relax and discontinue pursuing it. The response has been made that the example code in the tutorial is more complicated than it should be. Digressions on SQL and databases are not relevant. Nor are comments on

Re: [fpc-pascal] Program efficiency

2022-11-09 Thread DougC via fpc-pascal
Maintaining understandable and readable code is often more important that runtime efficiency. Like others have said, there are likely many additional places you can address overall efficiency before dealing with these calculations. Doug C. On Wed, 09 Nov 2022 09:52:12 -0500 James

Re: [fpc-pascal] Pause Key

2023-04-13 Thread DougC via fpc-pascal
I think any function where you provide the key code value and obtain the status of the key should work. >From the Linux Documenation Project: The two keys PrintScrn/SysRq and Pause/Break are special in that they have two keycodes: the former has keycode 84 when Alt is pressed

Re: [fpc-pascal] Procedures that work like WRITELN()

2023-12-27 Thread DougC via fpc-pascal
It would be very useful if WriteStr() was a function that returned the resulting string instead of returning it via an output parameter. Then you could just wrap the Writeln parameters in WriteStr() and pass it to the new logging procedure. Unfortunately, the ISO extension did not end up doing

Re: [fpc-pascal] What's in Hello World

2024-01-11 Thread DougC via fpc-pascal
Ah, yes! The Hello World Machine. Doug C. On Thu, 11 Jan 2024 14:34:29 -0500 Adriaan van Os via fpc-pascal wrote --- Nikolay Nikolov via fpc-pascal wrote: > But that increases the binary size to 28 bytes. We can put a 'ret' That's still 27 bytes too much. Let's design a