Re: [fpc-pascal] Help with TList example

2020-09-08 Thread Tony Whyman via fpc-pascal
Two observations: 1. In Pascal you should use "new" and "dispose" to allocate and deallocate record types - not GetMem and FreeMem. 2. MyRec is a pointer type and you should code the line as MyRec^.Value := tmp On 08/09/2020 12:10, James Richters via fpc-pascal wrote: I'm trying to figure

Re: [fpc-pascal] Help with TList example

2020-09-08 Thread Tony Whyman via fpc-pascal
Of Tony Whyman via fpc-pascal Sent: Tuesday, September 8, 2020 7:21 AM To: fpc-pascal@lists.freepascal.org Cc: Tony Whyman Subject: Re: [fpc-pascal] Help with TList example Two observations: 1. In Pascal you should use "new" and "dispose" to allocate and deallocate recor

Re: [fpc-pascal] fpcmake packaging

2020-09-01 Thread Tony Whyman via fpc-pascal
On 01/09/2020 14:29, Ryan Joseph via fpc-pascal wrote: On Sep 1, 2020, at 7:46 PM, Tony Whyman via fpc-pascal wrote: fpcmake is a pre-processor that generates makefiles for fpc projects. You can use it to do just about anything a standard makefile can do, including including resource

Re: [fpc-pascal] fpcmake packaging

2020-09-01 Thread Tony Whyman via fpc-pascal
fpcmake is a pre-processor that generates makefiles for fpc projects. You can use it to do just about anything a standard makefile can do, including including resource files and running scripts. I use it all the time for building production versions of lazarus programs and prior to packaging

Re: [fpc-pascal] Sending Hex codes over TCP/IP

2020-09-11 Thread Tony Whyman via fpc-pascal
A TCP connection is no more than a pair of byte streams - one in each direction. You have to define your own structure for each byte stream and the procedures for use i.e. a protocol. lt will be easier if you can use a standard protocol such as http. An http POST is one way to send an array of

Re: [fpc-pascal] How to check if a network is available?

2021-06-18 Thread Tony Whyman via fpc-pascal
Yep, that's the golden rule in networking. The only way that you know that a bi-directional path is open is an end-to-end ping. Even then, you only know that it's open at the time the ping completed. If you are using TCP then you can always enable keepalive packets that effectively do the

Re: [fpc-pascal] Repost: TFieldType declaration change in FPC fixes_3_2 branch

2021-10-17 Thread Tony Whyman via fpc-pascal
Yes - but is that really a bug fix that justifies a non-backwards compatible change? On 17/10/2021 11:09, Michael Van Canneyt via fpc-pascal wrote: On Sun, 17 Oct 2021, Tony Whyman via fpc-pascal wrote: /Reposted with correct branch identifier/. I thought that a fixes branch was only

[fpc-pascal] Repost: TFieldType declaration change in FPC fixes_3_2 branch

2021-10-17 Thread Tony Whyman via fpc-pascal
/Reposted with correct branch identifier/. I thought that a fixes branch was only for bug fixes and not for issuing non-backwards compatible changes. However, TFieldType in db.pas now has 6 extra elements. The result is that IBX no longer compiles with the fixes_3_2 branch. I have also

[fpc-pascal] Issue #39746 fpwidestring case conversion string too long

2023-09-25 Thread Tony Whyman via fpc-pascal
This issue seems to be still open after one year. There was a proposed fix: https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/158. However the discussion seems to tail off without an obvious resolution. This is a clear bug in fpwidestring and needs to be fixed. What is the status?

Re: [fpc-pascal] I am offering a $100 reward for linking static libraries

2022-08-23 Thread Tony Whyman via fpc-pascal
Once upon a time (late-1990s) I had some reasonable success (shareware) marketing a JPEG library for Delphi. This was a wrapper around the Independent JPEG Group's JPEG software which was written in 'C'. My JPEG library had thus to link to a 'C' library and both dynamic and static linking was

[fpc-pascal] Can FPC link a program with static (.a) libraries on Windows

2024-02-16 Thread Tony Whyman via fpc-pascal
I have a Pascal program, compiled with FPC 3.2.2 and which appears to happily link and run with a static library compiled with gcc and having a ".a" prefix on linux. The functions in the static library and declared as external functions using the "external name name>" directive. The "".a"

Re: [fpc-pascal] case statement

2023-12-16 Thread Tony Whyman via fpc-pascal
On 16/12/2023 19:07, Gerhard Scholz via fpc-pascal wrote: ELSE/OTHERWISE I assume that came historically; the first implementation of a PASCAL compiler I have seen had no else or otherwise in the case startement. Some ater dialects introduced ELSE, other dialect(s) used OTHERWISE, FPC then

[fpc-pascal] RIP: Software design pioneer and Pascal creator Niklaus Wirth

2024-01-05 Thread Tony Whyman via fpc-pascal
"Swiss computer scientist Professor Niklaus Wirth died on New Year's Day, roughly six weeks before what would have been his 90th birthday." https://www.theregister.com/2024/01/04/niklaus_wirth_obituary/?utm_source=daily_medium=newsletter_content=top-article

Re: [fpc-pascal] client certificate mandatory and verification

2024-04-10 Thread Tony Whyman via fpc-pascal
If you want to use OpenSSL then you might be interesting in trying out my proposed update to the Indy components. This is to support the latest versions of OpenSSL and can be downloaded from: https://github.com/MWASoftware/Indy.proposedUpdate There is a test case in