Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Michael Van Canneyt via fpc-pascal
On Tue, 18 Aug 2020, Dwight Schauer via fpc-pascal wrote: On Tue, 2020-08-18 at 23:17 +0200, Marco van de Voort via fpc-pascal wrote: Op 2020-08-18 om 23:01 schreef Sven Barth via fpc-pascal: > Might be the even better solution as fcl-passrc will be better > maintained due to it being used f

Re: [fpc-pascal] Regression in 3.2.0 ??

2020-08-19 Thread Michael Van Canneyt via fpc-pascal
On Tue, 18 Aug 2020, Peter via fpc-pascal wrote: I wondering if there is a regression in 3.2.0. The Lazarus file fpguiwsprivate.pp no longer compiles. It was fine in 3.0.4. The error message "No matching implementation for interface method ... CDecl; found " is strange as the interface and

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-08-19 Thread Michael Van Canneyt via fpc-pascal
On Wed, 19 Aug 2020, Carlo Kok via fpc-pascal wrote: Hi, for PascalScript FFI support, are there plans to support RTTI .Invoke, or any form of FFI available to do dynamic invoke from Pascalscript to FPC/api code? As far as I know, the RTTI.Invoke is there. There are even tests for it. We u

Re: [fpc-pascal] Can't disable quoting in TStrings

2020-08-20 Thread Michael Van Canneyt via fpc-pascal
On Wed, 19 Aug 2020, Luis - SoftSAT Sistemas via fpc-pascal wrote: As stated in http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Classes.TStrings.QuoteChar setting QuoteChar to null should disable the quote, but it won't work in FPC 3.2. Hm. Seems they introduced this in XE6. Ple

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-08-21 Thread Michael Van Canneyt via fpc-pascal
On Fri, 21 Aug 2020, Bo Berglund via fpc-pascal wrote: What is the advantage of using synaser over serial in a simple non-gui program running in the console in Linux? I have been struggling making LazSerial work in a console app and been adviced to instead use synaser (which is what lazserial

Re: [fpc-pascal] Archive libraries

2020-08-22 Thread Michael Van Canneyt via fpc-pascal
On Sat, 22 Aug 2020, Darius Blaszyk via fpc-pascal wrote: On Thu, Aug 20, 2020 at 11:43 PM Darius Blaszyk wrote: I have done so for the xz format already. The code checks first if the utility is available and then invokes it. Potentially any other utility might be included that way. Howeve

Re: [fpc-pascal] bug tracker (bugs.freepascal.org) APPLICATION ERROR #400 (db connection failed)

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Christo Crause via fpc-pascal wrote: On Sun, Aug 30, 2020 at 9:45 AM Dmitry Boyarintsev via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: The site opens up with: APPLICATION ERROR #400 I also get the above mentioned error when trying to open the website. The

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: Hi, AddLibrary('libbla.pp') creates under Linux "blalib.so". I want "bla.so". How to do that? AddLibrary('libbla.pp').SetExeName('bla'); Michael. ___ fpc-pascal maillist - fpc-pascal@

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: On Sun, 30 Aug 2020 13:38:12 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: > Hi, > > AddLibrary('libbla.pp') creates under Linux "blal

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: On Sun, 30 Aug 2020 14:16:14 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: > On Sun, 30 Aug 2020 13:38:12 +0200 (CEST) > Michael Van Canneyt via fpc-

Re: [fpc-pascal] fpmake addlibrary

2020-08-30 Thread Michael Van Canneyt via fpc-pascal
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote: On Sun, 30 Aug 2020 16:22:58 +0200 (CEST) Michael Van Canneyt wrote: On Sun, 30 Aug 2020, Mattias Gaertner wrote: > On Sun, 30 Aug 2020 14:30:11 +0200 (CEST) > Michael Van Canneyt wrote: > >> [...] >>> Is there a workaround for

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-08-31 Thread Michael Van Canneyt via fpc-pascal
On Mon, 31 Aug 2020, Adriaan van Os via fpc-pascal wrote: Any recommendations for distributing a FPC gtk-2 GUI app on Linux ? I would prefer it to be as simple as possible. Use something like AppImage ? Create a .desktop file? Or create different packages for different distros ? The applica

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-08-31 Thread Michael Van Canneyt via fpc-pascal
On Mon, 31 Aug 2020, Bo Berglund via fpc-pascal wrote: On Fri, 21 Aug 2020 21:03:31 +0200, Bo Berglund via fpc-pascal wrote: Instead I need to add a thread for reading data so I can have an event driven reception of data. It would read available data and fire off a NotifyEvent to handle the

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-08-31 Thread Michael Van Canneyt via fpc-pascal
On Mon, 31 Aug 2020, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt wrote: This is a puzzling sentence: "From the Linux Terminal only" - As opposed to what ? I meant to say that, without a .desktop file, the app is not double-clickable. Of course it is ? The .desktop file is

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Adriaan van Os via fpc-pascal wrote: leledumbo via fpc-pascal wrote: Or create different packages for different distros ? If you can afford the maintenance burden, this is the best that every specific distro user will love. Otherwise, just provide a compressed archive

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Bo Berglund via fpc-pascal wrote: On Tue, 01 Sep 2020 10:22:08 +0200, Bo Berglund via fpc-pascal wrote: Maybe I could tie the timeout to the actual baud used? Slower speeds use longer timeout etc? Timeout could be set to the time it takes to transfer the number of bytes

Re: [fpc-pascal] fpcmake packaging

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Ryan Joseph via fpc-pascal wrote: I've never used fpcmake before and instead relied on my own custom build system solutions which are a pain to maintain and non-standard which it makes extra work configuring the pascal language server I'm using now. My first question of

Re: [fpc-pascal] Linux GTK-2 GUI app

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt wrote: Normally a zip file with a the binary and supporing files, plus a README file should be enough. Can you refer me to an example ? You can't get more simple than this I think: https://github.com/gohugoio/h

Re: [fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

2020-09-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Sep 2020, Bo Berglund via fpc-pascal wrote: On Tue, 1 Sep 2020 14:21:44 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: You must still set the default value in the constructor. Note that the thread itself has no idea what is the baudrate in use so it cannot calculate

Re: [fpc-pascal] Procedural generics question

2020-09-04 Thread Michael Van Canneyt via fpc-pascal
On Thu, 3 Sep 2020, Lars via fpc-pascal wrote: On 2020-08-26 05:44, Nico Neumann via fpc-pascal wrote: The TypeInfo function checks the code during run-time thus the generated code is 'bloated'. Better use the compiler intrinsic GetTypeKind. {$mode objfpc} uses typinfo; generic procedur

Re: [fpc-pascal] Ethernet Relays

2020-09-06 Thread Michael Van Canneyt via fpc-pascal
On Sun, 6 Sep 2020, James Richters via fpc-pascal wrote: I've been using simpleget to control ethernet relays like this: S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); But if the IP address does not exist on the network I get this error: An unhandled exception occurred at $00

Re: [fpc-pascal] TFPTimer does not fire, why?

2020-09-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Sep 2020, Bo Berglund via fpc-pascal wrote: Ì have a problem using TFpTimer on Linux (FPC 3.0.4, Lazarus 2.0.8 on Raspbian). The application is a small GUI test app where I have added a timer in order to update the display with incoming data. So I have it set up like this: {$mode De

Re: [fpc-pascal] TFPTimer does not fire, why?

2020-09-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Sep 2020, Bo Berglund via fpc-pascal wrote: On Mon, 7 Sep 2020 12:40:07 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: Why does the FpTimer event not fire? Do you call checksynchronize at regular intervals ? The default timer is threaded, and the OnTimer event is

Re: [fpc-pascal] Ethernet Relays

2020-09-07 Thread Michael Van Canneyt via fpc-pascal
Add the ssockets unit to your uses clause. Michael On Mon, 7 Sep 2020, James Richters via fpc-pascal wrote: When I try to compile either of the examples below, I get Error: Identifier not found "ESocketError" Any ideas? James Yes, catch the ESocketError in a try..except: Try S:=TFPHTT

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: I added ssockets now I can compile it. I have this working with the ssockets unit added: Try S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); except On E: ESocketError do Writeln('Could not connect to server'); end;

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: Yes 10 was too short, I made it larger and larger until it worked. 1000 was the lowest value that worked so I set it to 2000, that's still quite a bit faster than the default. If I make a mistake in the link but the server IP addres

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

2020-09-11 Thread Michael Van Canneyt via fpc-pascal
On Fri, 11 Sep 2020, James Richters via fpc-pascal wrote: I'm trying to figure out how to send and receive Arrays of Bytes or perhaps a buffer of hex codes over TCP/IP, but everything I find seems to want to send and receive strings. Can someone please point me in the right direction on how t

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal > schrieb am Sa., 12

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-14 13:39, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: opened: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS} { if no codepage is yet assigned then assign default ansi codepage } TextRec(t).CodePage:=TranslatePlaceholderCP(TextRec(t).CodePage); {$else FPC_HAS_FEATURE_ANSISTRINGS} I see no need to c

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Michael Van Canneyt via fpc-pascal
On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: application (let's say notepad.exe) will result in garbage. I don't say that it is necessarily bad, but it should be documented at least if we want to keep it that way. I would definitely keep it that way. As I see it: Redirection or

Re: [fpc-pascal] netdb and DNS queries for MX, TXT, and other resource types

2020-09-16 Thread Michael Van Canneyt via fpc-pascal
On Wed, 16 Sep 2020, Noel Duffy via fpc-pascal wrote: I'm in need of a library to perform DNS lookups for a range of different resource types such as MX, TXT, PTR and so on. At first I thought that netdb would do the job, but it turns out that it only supports direct A and AAA lookups. Howev

Re: [fpc-pascal] netdb and DNS queries for MX, TXT, and other resource types

2020-09-16 Thread Michael Van Canneyt via fpc-pascal
On Wed, 16 Sep 2020, Noel Duffy via fpc-pascal wrote: On 16/09/20 8:43 pm, Michael Van Canneyt via fpc-pascal wrote: On Wed, 16 Sep 2020, Noel Duffy via fpc-pascal wrote: I'm in need of a library to perform DNS lookups for a range of different resource types such as MX, TXT, PTR a

Re: [fpc-pascal] -Fu unit search path and network paths

2020-09-21 Thread Michael Van Canneyt via fpc-pascal
On Mon, 21 Sep 2020, Ryan Joseph via fpc-pascal wrote: On Sep 21, 2020, at 2:16 PM, LacaK via fpc-pascal wrote: when I use in *uses* clause: I never knew "in" even existed! This totally blows my mind. Was it something added from Delphi that I never heard about? Since the very first

Re: [fpc-pascal] stdcall without the ;

2020-09-23 Thread Michael Van Canneyt via fpc-pascal
On Wed, 23 Sep 2020, Luca Olivetti via fpc-pascal wrote: Hello, I just compiled a lazarus project made in 2105 with fpc 3.2.0 and, while it works here, it fails when the customer runs it. I noticed that I'm using a dll and the functions and callbacks are declared stdcall (the platform is

Re: [fpc-pascal] stdcall without the ;

2020-09-23 Thread Michael Van Canneyt via fpc-pascal
On Wed, 23 Sep 2020, Luca Olivetti via fpc-pascal wrote: But I don't have the hardware managed by the DLL so the callbacks are never called here. Can't you create a stub DLL to test? it doesn't need to do anything, just log the params maybe... Michael. ___

Re: [fpc-pascal] Buffer size for TCP DNS queries in netdb

2020-09-26 Thread Michael Van Canneyt via fpc-pascal
On Sat, 26 Sep 2020, Noel Duffy via fpc-pascal wrote: Hi all, I've spent some time this past couple of weeks reading through the DNS resolver code in netdb and poring over RFCs that specify the protocol with a view to adding support for additional resource record queries. Things like TXT,

Re: [fpc-pascal] Buffer size for TCP DNS queries in netdb

2020-09-27 Thread Michael Van Canneyt via fpc-pascal
On Sun, 27 Sep 2020, Noel Duffy via fpc-pascal wrote: On 26/09/20 9:07 pm, Michael Van Canneyt via fpc-pascal wrote: On Sat, 26 Sep 2020, Noel Duffy via fpc-pascal wrote: To restate the question, is 64k too much overhead for DNS queries? That overhead would be present on all queries

Re: [fpc-pascal] json parser line numbers

2020-09-29 Thread Michael Van Canneyt via fpc-pascal
On Tue, 29 Sep 2020, Benito van der Zander via fpc-pascal wrote: Hi, the line numbering of the json parser has been changed recently. It used to say "Error at line 1"... when there was an error in the first line, but now it says "Error at line 0"... Was that on purpose, or can someone cha

Re: [fpc-pascal] json parsing: detecting invalid escape sequences

2020-09-29 Thread Michael Van Canneyt via fpc-pascal
On Tue, 29 Sep 2020, Benito van der Zander via fpc-pascal wrote: Hi, I am supposed to find invalid escape sequences when parsing JSON and replace them with a user defined fallback. Invalid in the sense that the unicode codepoint is not defined or a missing surrogate, not syntactically inval

Re: [fpc-pascal] Cross platform question about lpi file content

2020-10-01 Thread Michael Van Canneyt via fpc-pascal
On Wed, 30 Sep 2020, Sven Barth via fpc-pascal wrote: Lazarus is not Delphi. In Delphi this worked, because on Windows the GUI libraries are always available and Windows doesn't care if you use UI code in a "console" binary. On other systems (especially Linux and BSD) this might not be the c

Re: [fpc-pascal] TFPGMapObject duplicate errors

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 1, 2020, at 7:00 PM, Vojtěch Čihák via fpc-pascal wrote: I looked to code, it gives error only when map is Sorted=True. Thanks. Sneaky that sorted had to be set to true. Not sure why that would be. Because otherwise it wou

Re: [fpc-pascal] TFPGMapObject duplicate errors

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sat, 3 Oct 2020, Mattias Gaertner via fpc-pascal wrote: On Sat, 3 Oct 2020 15:53:58 +0200 (CEST) Michael Van Canneyt via fpc-pascal wrote: On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote: [...] > Thanks. Sneaky that sorted had to be set to true. Not sure why that > wo

Re: [fpc-pascal] Converting date formats

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sat, 3 Oct 2020, Ryan Joseph via fpc-pascal wrote: I have some dates formats like this which I would like to convert to TDateTime. Are these supported in the RTL? I tried using the StrToDate functions but I got errors. program test; uses SysUtils; begin StrToDate('2001-12-14T21:59:43.1

Re: [fpc-pascal] Converting date formats

2020-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sat, 3 Oct 2020, Ryan Joseph via fpc-pascal wrote: I have no idea about dates and where to find these functions in the RTL. I just saw the date at https://tools.ietf.org/html/rfc3339. Well, if you are really ignorant about these functions, why not go to the index page (linked to from the

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-05 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: I often need to use a function which reads a file into a string, as is so common in so many scripting languages. Can it be considered to add something like this to the RTL? Since we have a refcounted Ansistring type it's natural for this

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 5, 2020, at 3:23 PM, Michael Van Canneyt via fpc-pascal wrote: So I think you're looking at 6 or even 8 versions of this hypothetical function... Ouch. :) I'm sure this code already exists in the RTL though,

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 5, 2020, at 5:08 PM, Jean SUZINEAU via fpc-pascal wrote: In my own code I use BlockRead/BlockWrite, but I'm wondering if I've not seen this somewhere in RTL. This looks good to me what about the concerns raised by Michael?

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
Then there would be only one way in the RTL for this task and not two once *IOUtils* (foundation webpage says it's planned anyway) is implemented. Am Di., 6. Okt. 2020 um 10:12 Uhr schrieb Michael Van Canneyt via fpc-pascal : On Mon, 5 Oct 2020, Ryan Joseph via fpc-pascal wrote: O

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Tue, 6 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal wrote: I added the following functions to the sysutils unit (rev 47056): Great, thanks Michael. I've always used AnsiString so why is UnicodeString preferable

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Michael Van Canneyt via fpc-pascal
On Tue, 6 Oct 2020, Bart via fpc-pascal wrote: On Tue, Oct 6, 2020 at 10:12 AM Michael Van Canneyt via fpc-pascal wrote: // Assume TEncoding.SystemEncoding Function GetFileAsString(Const aFileName : RawByteString) : RawByteString; // Specify encoding Function GetFileAsString(Const

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-07 Thread Michael Van Canneyt via fpc-pascal
On Tue, 6 Oct 2020, Ryan Joseph via fpc-pascal wrote: Since we're on the topic how about another one-liner for reading all the files in directory into a dynamic array? This has the added benefit of getting enumeration for free. This is standard stuff for working with files in scripting lang

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote: I would like to know if data containers of type packed record are zeroed when the item is declared? type TMyRecord = packed record AField1: byte; AField2: word; AField3: single; AField4: boolean; AField5: array[0..15] of Ca

Re: [fpc-pascal] Precedence of compiler switches/directives

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Peter via fpc-pascal wrote: I'm curious about who wins, if switches/directives are set to different values in different places. They could be set in fpg.cfg Command line or Lazarus lpi Directives in the code. Is there some AND/OR logic, or is it a strict precedence order?

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote: On Thu, 8 Oct 2020 10:47:52 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote: I would like to know if data containers of type packed record are zeroed when the item is

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal wrote: You can define typed constant and assign it to variable. type TMyRecord = record X, Y: Integer; S: String; end; const MYDEFREC: TMyRecord = (X: 1; Y: 2; S: 'ABC'); I

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-08 Thread Michael Van Canneyt via fpc-pascal
On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal wrote: // Read raw content as bytes Function GetFileContents(Const aFileName : RawByteString) : TBytes; Function GetFileContents(Const aFileName : UnicodeString

Re: [fpc-pascal] Are record fields zeroed on declaration of a record?

2020-10-09 Thread Michael Van Canneyt via fpc-pascal
On Fri, 9 Oct 2020, Bo Berglund via fpc-pascal wrote: On Thu, 8 Oct 2020 23:00:32 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote: On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal wrote: You can define typed constant

Re: [fpc-pascal] netdb, DNS and TCP

2020-10-11 Thread Michael Van Canneyt via fpc-pascal
On Sun, 11 Oct 2020, Noel Duffy via fpc-pascal wrote: Hi all, To keep track of the work I've been doing on DNS in netdb, I created bug #37906 in Mantis. https://bugs.freepascal.org/view.php?id=37906 I've attached to a note on that bug report a proof-of-concept version of netdb.pp and a s

Re: [fpc-pascal] netdb, DNS and TCP

2020-10-12 Thread Michael Van Canneyt via fpc-pascal
On Mon, 12 Oct 2020, Noel Duffy via fpc-pascal wrote: On 11/10/20 9:42 pm, Michael Van Canneyt via fpc-pascal wrote: On Sun, 11 Oct 2020, Noel Duffy via fpc-pascal wrote: To avoid that duplication, the code would need to use a dynamic buffer and fill it just before socket writing. The

Re: [fpc-pascal] New package to evaluate Pascal-expressions

2020-10-21 Thread Michael Van Canneyt via fpc-pascal
On Wed, 21 Oct 2020, Joost van der Sluis via fpc-pascal wrote: Hi all, Working on fpDebug, I've got onto a side-track and created an expression-evaluator based on fcl-passrc . So that you can evaluate Pascal-expressions at runtime. Hah

Re: [fpc-pascal] FPC 3.2fixes UTF8Decode strange place

2020-10-29 Thread Michael Van Canneyt via fpc-pascal
On Thu, 29 Oct 2020, AlexeyT via fpc-pascal wrote:  So can you COMMENT that dead part with "and FALSE" and dead part II with "if ... =#10"? It will make things faster for people! It will make things faster for people as well if you point at the right unit or mail on the right mailing list.

Re: [fpc-pascal] fppdf textwidth

2020-11-09 Thread Michael Van Canneyt via fpc-pascal
On Mon, 9 Nov 2020, Mattias Gaertner via fpc-pascal wrote: Hi all, This has probably been asked before but I can't find the answer. How to get the text width of a string? I see code for the standard pdf fonts, but all these functions are private. The PDF classes do not support calculating

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-19 Thread Michael Van Canneyt via fpc-pascal
On Fri, 20 Nov 2020, Sven Barth via fpc-pascal wrote: Graeme Geldenhuys via fpc-pascal schrieb am Fr., 20. Nov. 2020, 01:33: For those console programmers out there... Is there anything in console help output that you like or wish you had. That way I could possibly add it and make this even

Re: [fpc-pascal] Compilation speed on Apple M1

2020-11-22 Thread Michael Van Canneyt via fpc-pascal
On Sun, 22 Nov 2020, Florian Klämpfl via fpc-pascal wrote: Am 21.11.2020 um 12:54 schrieb Tobias Giesen via fpc-pascal: Hello, first and foremost, many thanks to the creators and contributors of FPC and Lazarus, who enabled me to release my product natively for Apple Silicon only one day aft

[fpc-pascal] Daily docs

2020-11-28 Thread Michael Van Canneyt via fpc-pascal
Hello, I finally decided to tackle something which was on my TODO list for many years. From now on we generate daily documentation updates. They are accessible from this page: https://www.freepascal.org/daily/daily.html This is not only the FPC documentation as generated from the sources, b

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-01 Thread Michael Van Canneyt via fpc-pascal
On Mon, 30 Nov 2020, Sven Barth via fpc-pascal wrote: Am 30.11.2020 um 13:20 schrieb LacaK via fpc-pascal: Hi, is there a way how to initialize record member of pointer type (other than PChar) in the following example: type   TMyRec=record     a: PByte; // if I change PByte to PAnsiChar t

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-01 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Dec 2020, Ladislav Karrach via fpc-pascal wrote: Because MyConst1 is not an *untyped* constant. Only untyped constants can be used in constant expressions (a pointer to something can be considered an untyped constant). The following might work though I did not test it: === co

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Michael Van Canneyt via fpc-pascal
On Tue, 1 Dec 2020, Luca Olivetti via fpc-pascal wrote: Since I want to treat a specific exception that cannot be distinguished by the class alone but only by the class and message, I need to find the current translation of the resource string used to create the exception. The documentation

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Michael Van Canneyt via fpc-pascal
On Wed, 2 Dec 2020, Luca Olivetti via fpc-pascal wrote: But the 'current translation' is simply the value of the resourcestring, so you should not need to look it up ? How? I'm trying to detect this specific exception raise EInvalidOperation.Create(sCannotFocus); (where sCannotFocus

Re: [fpc-pascal] How to get the current translation of a resource string?

2020-12-02 Thread Michael Van Canneyt via fpc-pascal
On Wed, 2 Dec 2020, Mattias Gaertner via fpc-pascal wrote: On Wed, 2 Dec 2020 13:30:13 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: On Wed, 2 Dec 2020, Luca Olivetti via fpc-pascal wrote: [...] > but it doesn't work (sCannotFocus holds the original, not the > transla

Re: [fpc-pascal] netdb, TCP, and DNS queries

2020-12-06 Thread Michael Van Canneyt via fpc-pascal
On Sun, 6 Dec 2020, Noel Duffy via fpc-pascal wrote: Hi all, Following up on the work I've being doing to add support for DNS queries over TCP to netdb and to add support for querying all of the standard resource types such as MX, SOA, TXT, NS, etc, I've added the proposed changes to a not

Re: [fpc-pascal] netdb, TCP, and DNS queries

2020-12-06 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Dec 2020, Noel Duffy via fpc-pascal wrote: On 7/12/20 12:41 am, Michael Van Canneyt via fpc-pascal wrote: On Sun, 6 Dec 2020, Noel Duffy via fpc-pascal wrote: Hi all, Following up on the work I've being doing to add support for DNS queries over TCP to netdb and to add su

Re: [fpc-pascal] FCL-DB Classes Implementation.

2020-12-22 Thread Michael Van Canneyt via fpc-pascal
Unfortunately not, I have sidetracked that project for the time being: I accidentally reformatted the USB stick with the sources, and since the need was no longer there for me I didn't have the courage to restart it :/ Sorry about that :( Michhael On Tue, 22 Dec 2020, Kakoulidis Ioulianos v

Re: [fpc-pascal] TCustomStream still using LongInt and not Int64

2020-12-27 Thread Michael Van Canneyt via fpc-pascal
On Sun, 27 Dec 2020, Graeme Geldenhuys via fpc-pascal wrote: Hi, Is this a bug in FPC 3.2.0 where TCustomStream still uses LongInt in the Read() method, where all other methods in in the class uses Int64 type? Here is the FPC code: TCustomMemoryStream = class(TStream) private FMemory:

Re: [fpc-pascal] bug or feature

2021-01-01 Thread Michael Van Canneyt via fpc-pascal
On Fri, 1 Jan 2021, Mattias Gaertner via fpc-pascal wrote: Hi, library test; procedure Test; begin end; exports Test name 3 'abc'; //^^^ end. I think this is a bug. Delphi also barfs on it. However the following does work: exports Test index 1 name 'abc'; Although incomp

[fpc-pascal] FPDoc now with Markdown support

2021-01-02 Thread Michael Van Canneyt via fpc-pascal
Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units) is now capable of outputting the documentation in markdown. This can be used as input for mkdocs or another engine such as sphinx. As a first engine, I tack

Re: [fpc-pascal] FPDoc now with Markdown support

2021-01-02 Thread Michael Van Canneyt via fpc-pascal
On Sat, 2 Jan 2021, Marco van de Voort via fpc-pascal wrote: Op 2021-01-02 om 15:31 schreef Michael Van Canneyt via fpc-pascal: Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units) is now c

Re: [fpc-pascal] FPDoc now with Markdown support

2021-01-04 Thread Michael Van Canneyt via fpc-pascal
On Mon, 4 Jan 2021, Bo Berglund via fpc-pascal wrote: On Sat, 2 Jan 2021 15:31:11 +0100 (CET), Michael Van Canneyt via fpc-pascal wrote: Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-08 Thread Michael Van Canneyt via fpc-pascal
On Fri, 8 Jan 2021, Luca Olivetti via fpc-pascal wrote: El 7/1/21 a les 16:59, Luca Olivetti via fpc-pascal ha escrit: El 7/1/21 a les 16:15, Luca Olivetti via fpc-pascal ha escrit: Hello, I need to tailor the content based on the remote ip address. I use the property RemoteAddr of a TReque

Re: [fpc-pascal] SQLDB: Set port in TSQLConnector

2021-01-12 Thread Michael Van Canneyt via fpc-pascal
On Mon, 11 Jan 2021, Virgo Pärna via fpc-pascal wrote: On Fri, 08 Jan 2021 14:25:09 -0300, Luis - SoftSAT Sistemas via fpc-pascal wrote: I'm trying to connect to a Firebird database with TSQLConnector, but I can't seem to find a way to set the port number. Looking at TIBConnection, there

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-12 Thread Michael Van Canneyt via fpc-pascal
On Tue, 12 Jan 2021, Luca Olivetti via fpc-pascal wrote: El 8/1/21 a les 11:14, Luca Olivetti via fpc-pascal ha escrit: El 8/1/21 a les 11:06, Michael Van Canneyt via fpc-pascal ha escrit: Are you using https ? No, plain text http. An even weirder fact is that I seem to get the wrong ip

Re: [fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

2021-01-12 Thread Michael Van Canneyt via fpc-pascal
On Tue, 12 Jan 2021, Luca Olivetti via fpc-pascal wrote: El 12/1/21 a les 10:24, Michael Van Canneyt via fpc-pascal ha escrit: Am I right thinking that, even if several copies of the above method are running, each will get it's own local variables, so the LocCommandQueue variabl

Re: [fpc-pascal] Patches for Issue #37906 - DNS over TCP

2021-01-30 Thread Michael Van Canneyt via fpc-pascal
On Sat, 30 Jan 2021, Noel Duffy via fpc-pascal wrote: I've added patches to resolve issue #37906, DNS over TCP, to the bug tracker: https://bugs.freepascal.org/view.php?id=37906 I've broken the changes into three patches: 1. netdb.patch, which updates packages/fcl-net/src/netdb.pp, adding s

Re: [fpc-pascal] Patches for Issue #37906 - DNS over TCP

2021-01-30 Thread Michael Van Canneyt via fpc-pascal
On Sat, 30 Jan 2021, Noel Duffy via fpc-pascal wrote: On 30/01/21 9:45 pm, Michael Van Canneyt via fpc-pascal wrote: On Sat, 30 Jan 2021, Noel Duffy via fpc-pascal wrote: I've added patches to resolve issue #37906, DNS over TCP, to the bug tracker: https://bugs.freepascal.org/vie

Re: [fpc-pascal] Patches for Issue #37906 - DNS over TCP

2021-01-30 Thread Michael Van Canneyt via fpc-pascal
On Sat, 30 Jan 2021, Sven Barth via fpc-pascal wrote: In addition to new code for DNS over TCP, this latest set of patches adds checks for writes beyond buffer boundaries and other potential security issues. Since the last update I've also added support for SRV records, as defined in RFC 278

Re: [fpc-pascal] Statically linked-in fpc code

2021-02-05 Thread Michael Van Canneyt via fpc-pascal
On Fri, 5 Feb 2021, Sven Barth via fpc-pascal wrote: Adriaan van Os via fpc-pascal schrieb am Fr., 5. Feb. 2021, 10:50: Adriaan van Os via fpc-pascal wrote: Jonas Maebe via fpc-pascal wrote: On 2021-02-05 09:24, Adriaan van Os via fpc-pascal wrote: It's crazy !

Re: [fpc-pascal] Statically linked-in fpc code

2021-02-05 Thread Michael Van Canneyt via fpc-pascal
On Fri, 5 Feb 2021, Michael Van Canneyt via fpc-pascal wrote: On Fri, 5 Feb 2021, Sven Barth via fpc-pascal wrote: Adriaan van Os via fpc-pascal schrieb am Fr., 5. Feb. 2021, 10:50: Adriaan van Os via fpc-pascal wrote: Jonas Maebe via fpc-pascal wrote: On 2021-02-05 09:24, Adriaan

Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-06 Thread Michael Van Canneyt via fpc-pascal
On Sat, 6 Feb 2021, Bo Berglund via fpc-pascal wrote: FPC versions. Graeme thanks for the info! Since I am not doing any fpc or lazarus development I guess I don't really need all of that.. My .fpc.cfg file also has the $fpcversion everywhere in the paths so I guess that unless a new versio

Re: [fpc-pascal] Value:x:y syntax

2021-02-09 Thread Michael Van Canneyt via fpc-pascal
On Tue, 9 Feb 2021, Luis Henrique via fpc-pascal wrote: At https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html I saw the syntax "value: x: y". str(value:6:3, valuestr); What is the name of this and where is it documented? It is documented in the official documentati

Re: [fpc-pascal] Traits Proposal

2021-02-09 Thread Michael Van Canneyt via fpc-pascal
On Tue, 9 Feb 2021, Ryan Joseph via fpc-pascal wrote: We had talked about this some time ago and it's been rattling around in my brain so I wanted to write it down into a formal proposal where we can discuss it and hopefully agree upon a syntax. Everything is preliminary and tentative but th

Re: [fpc-pascal] Traits Proposal

2021-02-10 Thread Michael Van Canneyt via fpc-pascal
On Wed, 10 Feb 2021, Ryan Joseph via fpc-pascal wrote: On Feb 10, 2021, at 12:32 AM, Michael Van Canneyt via fpc-pascal wrote: Instead of trait you might as well use simply "object", so basically we could simply state that instead of an interface, you can also specify an obj

Re: [fpc-pascal] Traits Proposal

2021-02-10 Thread Michael Van Canneyt via fpc-pascal
On Wed, 10 Feb 2021, Ryan Joseph via fpc-pascal wrote: On Feb 10, 2021, at 8:41 AM, Michael Van Canneyt wrote: I heavily object to this; We have way too much keywords as it is already. So unless there really is no other way I don't think we should introduce even more. I guess the first

Re: [fpc-pascal] Traits Proposal

2021-02-14 Thread Michael Van Canneyt via fpc-pascal
On Sun, 14 Feb 2021, Sven Barth via fpc-pascal wrote: So whether it be this, or just an improvement on the Interfaces we already have, I'd definitely personally be in favor of something that "works like Interfaces except minus the negative performance implications." There are no significan

Re: [fpc-pascal] Traits Proposal

2021-02-14 Thread Michael Van Canneyt via fpc-pascal
On Sun, 14 Feb 2021, Ryan Joseph via fpc-pascal wrote: On Feb 14, 2021, at 5:30 AM, Michael Van Canneyt via fpc-pascal wrote: Interfaces means an extra object per interface, so more objects on the heap with all the extra memory management that implies. You mean COM interfaces? I&#x

Re: [fpc-pascal] Traits Proposal

2021-02-14 Thread Michael Van Canneyt via fpc-pascal
On Sun, 14 Feb 2021, Sven Barth via fpc-pascal wrote: Am 14.02.2021 um 13:30 schrieb Michael Van Canneyt via fpc-pascal: On Sun, 14 Feb 2021, Sven Barth via fpc-pascal wrote: So whether it be this, or just an improvement on the Interfaces we already have, I'd definitely personally

Re: [fpc-pascal] Cannot write datetime field on sqlite3 database on ARM

2021-03-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 8 Mar 2021, Toru Takubo via fpc-pascal wrote: Hi, I am developing my app on Windows and building apps for other platforms by using cross compiler. Now I have a problem only occurred on Linux ARM. The problem is that it cannot write datetime field on sqlite3 database. It can read/writ

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Michael Van Canneyt via fpc-pascal
On Mon, 8 Mar 2021, Adriaan van Os via fpc-pascal wrote: adriaan% cat uniquizz-utf8.pas {$codepage utf8} program uniquizz; var chars: UnicodeString; begin chars := '⌘ key'; writeln(chars); writeln(chars[1]); writeln( 'size ', sizeOf( chars)); writeln( 'length ', length( chars));

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Michael Van Canneyt via fpc-pascal
On Mon, 8 Mar 2021, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt wrote: The output for me is the same, regardless of the -FcUTF-8 flag being present or not: question marks. But if I add uses cwstring; all will be well. Rationale: Without that, the RTL cannot convert whateve

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Michael Van Canneyt via fpc-pascal
On Mon, 8 Mar 2021, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: You didn't configure your environment to deal correctly with Unicode. Wow ! what a sentence ! That sounds like "you didn't configure your car correctly to also take corne

  1   2   3   4   5   6   >