Re: [fpc-pascal] Virtual object methods

2019-07-02 Thread Michael Van Canneyt
On Tue, 2 Jul 2019, Ryan Joseph wrote: On Jul 2, 2019, at 10:32 AM, Michael Van Canneyt wrote: It overwrites the first. There is no such thing as '2 VMT tables'. That’s what I thought. How costly is this? Not sure what it’s doing under the hood but I’d like to know more. As far as I

Re: [fpc-pascal] Virtual object methods

2019-07-02 Thread Michael Van Canneyt
On Tue, 2 Jul 2019, Ryan Joseph wrote: Another question: what happens if you call the constructor twice? Does this create 2 VMT tables or overwrites the first? It overwrites the first. There is no such thing as '2 VMT tables'. Michael. ___

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-07-02 Thread Michael Van Canneyt
On Tue, 2 Jul 2019, Sven Barth via fpc-pascal wrote: Michael Van Canneyt schrieb am Di., 2. Juli 2019, 08:20: On Mon, 1 Jul 2019, Sven Barth via fpc-pascal wrote: Am 01.07.2019 um 23:18 schrieb Michael Van Canneyt: By the way: is it correct that the sqldbrestdataset currently does

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-07-02 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, Sven Barth via fpc-pascal wrote: Am 01.07.2019 um 23:18 schrieb Michael Van Canneyt: By the way: is it correct that the sqldbrestdataset currently does not support editing/inserting/deleting entries? Do you plan to change this? Ehm, no, of course it is supposed

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, Sven Barth via fpc-pascal wrote: Am 24.06.2019 um 09:30 schrieb Michael Van Canneyt: With the sample module, I tested all possible cases: I updated both FPC and Lazarus and also tested the sample module. However those variants BasePath empty don't work. I get

Re: [fpc-pascal] Changing compiler modes

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, James Richters wrote: Thanks for the link to the list of mode switches. I'm still trying to figure out how I can best restructure.. I'll probably need to re-write a bunch of stuff to make things all work in the same mode. I'm thinking of making it all work in fpc

Re: [fpc-pascal] Changing compiler modes

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, James Richters wrote: I see how {$ModeSwitch } work now.. I have far more code that only works in {$Mode TP} so I supposed I'll have to just re-write things to stay compatible with that. Is there a {$Modeswitch } feature I can turn on to allow the % to specify binary

Re: [fpc-pascal] Changing compiler modes

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, James Richters wrote: I am trying to merge a bunch of my pascal units into a single unit, to avoid circular references. This is quite a challenge because they are not all compiled with the same mode. Some units use {$Mode TP} And I can't compile some of the procedures

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-06-28 Thread Michael Van Canneyt
On Fri, 28 Jun 2019, Michael Van Canneyt wrote: The demo's that were compiled, I tried to open locally and from the cgi-bin folder, but no succes. For instance the demobar example only shows: TChartJS Create bar charts using Pas2JS & ChartJS (view source ) It works here. What do

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-06-27 Thread Michael Van Canneyt
On Fri, 28 Jun 2019, Darius Blaszyk wrote: pas2js is used as the basis for TMS Web Core (a commercial product for Delphi/lazarus. pas2js is meanwhile very mature. (I use it myself extensively :)) You must use this if you wish to include a lot of browser-side functionality. What do you mean,

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-06-27 Thread Michael Van Canneyt
On Thu, 27 Jun 2019, Darius Blaszyk wrote: Hi all, I have been asked to write a limited functionality / mini ERP type of software for an NGO that is setting up a hospital. I'm doing this in my own time and free of charge. The compiler and IDE of choice are of course FreePascal & Lazarus.

Re: [fpc-pascal] String conversions

2019-06-26 Thread Michael Van Canneyt
On Wed, 26 Jun 2019, Marco van de Voort wrote: Op 25/06/2019 om 21:58 schreef Ryan Joseph: An exponential growing function applied to all strings would have many worse case behaviours, where it would eat up heaps of memory for nothing. This is why it is better to have the programmer

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-24 Thread Michael Van Canneyt
On Sun, 23 Jun 2019, Sven Barth via fpc-pascal wrote: - localhost:8080/metadata works - localhost:8080/users returns "INVALID RESOURCE" Because it has rdoConnectionInURL set, and so you must do localhost:8080/expenses/users Ahh! Hadn't seen that this option is active... Okay, then it

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-23 Thread Michael Van Canneyt
On Sun, 23 Jun 2019, Sven Barth via fpc-pascal wrote: Okay, independently of whether the REST module is the optimal solution or not, it should work, right? (and shouldn't the Wiki entry then mention the advantages/disadvantages of the two approaches? Cause when looking at the SQLDB REST

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-22 Thread Michael Van Canneyt
On Sat, 22 Jun 2019, Sven Barth via fpc-pascal wrote: The REst Module has the additional disadvantage that you must have an initial /REST/ or whatever part in your URL. With the dispatcher on a datamodule, you can skip this if so desired... Okay, independently of whether the REST module is

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-22 Thread Michael Van Canneyt
On Fri, 21 Jun 2019, Sven Barth via fpc-pascal wrote: Hello together! I've played around a bit with the SQLDBRESTBridge and encountered some troubles which I wanted to check up here on the list whether those are indeed bugs or not before reporting them to Mantis. For the tests I've used FPC

Re: [fpc-pascal] Class field property access

2019-06-07 Thread Michael Van Canneyt
On Thu, 6 Jun 2019, Ryan Joseph wrote: On Jun 3, 2019, at 11:13 AM, Sven Barth via fpc-pascal wrote: The b field could be Nil and the class might not provide any functionality to check for that. In addition to that it's an additional indirection while records/objects merely require an

Re: [fpc-pascal] TStringList/pchar question

2019-06-02 Thread Michael Van Canneyt
On Sun, 2 Jun 2019, Ryan Joseph wrote: I just learned that pchar is not ref counted like I used to think so I’m curious why this code doesn’t fail. Shouldn’t this crash because I free TStringList and then access GetText? You're first doing gettext and then freeing. So this is OK.

Re: [fpc-pascal] SetCodePage in older FPC 3.0.4

2019-05-29 Thread Michael Van Canneyt
On Wed, 29 May 2019, Tomas Hajny wrote: On 2019-05-29 12:19, Michael Van Canneyt wrote: On Wed, 29 May 2019, Michael Van Canneyt wrote: On Wed, 29 May 2019, AlexeyT wrote: FPC generally uses system library functions for the conversion, so it does not depend on the FPC version. But FPC

Re: [fpc-pascal] SetCodePage in older FPC 3.0.4

2019-05-29 Thread Michael Van Canneyt
On Wed, 29 May 2019, Michael Van Canneyt wrote: On Wed, 29 May 2019, AlexeyT wrote: FPC generally uses system library functions for the conversion, so it does not depend on the FPC version. But FPC has such files. Are they used in SetCodePage code? user@PC:~/fpcupdeluxe/fpcsrc/packages

Re: [fpc-pascal] SetCodePage in older FPC 3.0.4

2019-05-29 Thread Michael Van Canneyt
On Wed, 29 May 2019, AlexeyT wrote: FPC generally uses system library functions for the conversion, so it does not depend on the FPC version. But FPC has such files. Are they used in SetCodePage code? user@PC:~/fpcupdeluxe/fpcsrc/packages/rtl-unicode/src/inc$ ls cp* cp895.pas  cp932.pas 

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-21 Thread Michael Van Canneyt
On Tue, 21 May 2019, Mattias Gaertner via fpc-pascal wrote: On Tue, 21 May 2019 16:47:28 +0100 Graeme Geldenhuys wrote: [...] I fully agree with what Michael said. You can't truly expect applications developer to trail and error what needs to be done. It's an LCL issue that the Lazarus

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-21 Thread Michael Van Canneyt
On Tue, 21 May 2019, Giuliano Colla wrote: Il 21/05/2019 14:40, Michael Van Canneyt ha scritto: FreeThenNil should never be necessary. FreeAndNil() should be enough for all circumstances. In a perfect world maybe you're right. But if you're dealing with LCL, you'll find it sometimes

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-21 Thread Michael Van Canneyt
On Tue, 21 May 2019, Graeme Geldenhuys wrote: On 20/05/2019 11:01 pm, Giuliano Colla wrote: In some rare case when dealing with complex objects you might need FreeThenNil() in place of FreeAndNil(). As far as I'm concerned, that is such a broken concept! The developer already has the

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-20 Thread Michael Van Canneyt
On Mon, 20 May 2019, James Richters wrote: I’m wondering if there is a way to test if a tstringlinst has been created yet? I looked at the documentation in these two locations: https://lazarus-ccr.sourceforge.io/docs/rtl/classes/tstringlist.html and

Re: [fpc-pascal] ContentData field size in FCGI_ContentRecor

2019-05-18 Thread Michael Van Canneyt
On Sat, 18 May 2019, Zamrony P. Juhara via fpc-pascal wrote: I do not think so, because custfpcgi.pp is using many const and types declared in fastcgi.pp. removing it will cause rewrite in many parts of custfcgi units You are right. I should not try to answer questions based on memory

Re: [fpc-pascal] ContentData field size in FCGI_ContentRecor

2019-05-18 Thread Michael Van Canneyt
On Sat, 18 May 2019, Zamrony P. Juhara via fpc-pascal wrote: custfcgi.pp and fpfcgi.pp both directly /indirectly depends on fastcgi unit. AFAIK this dependency can be removed, if it exists. Michael. ___ fpc-pascal maillist -

Re: [fpc-pascal] ContentData field size in FCGI_ContentRecord of fastcgi unit

2019-05-18 Thread Michael Van Canneyt
On Sat, 18 May 2019, Zamrony P. Juhara via fpc-pascal wrote: From fastcgi.pp https://github.com/graemeg/freepascal/blob/master/packages/fastcgi/src/fastcgi.pp In line 510 FCGI_ContentRecord = record     header : FCGI_Header;     ContentData : array[0..1023] of byte; end; Field ContentData

Re: [fpc-pascal] unexpected termination with no errors

2019-05-16 Thread Michael Van Canneyt
On Thu, 16 May 2019, Sven Barth via fpc-pascal wrote: Karoly Balogh (Charlie/SGR) schrieb am Mi., 15. Mai 2019, 18:40: Hi, On Wed, 15 May 2019, Sven Barth via fpc-pascal wrote: (Sidenote: I've been pondering for a while if I should report this as a bug. I think the RTL should put a

Re: [fpc-pascal] FPC does not compile after revision 42042

2019-05-12 Thread Michael Van Canneyt
On Sun, 12 May 2019, Victor Campillo wrote: Hi, After revision 42042 (last commit made by Michael Van Canneyt) I got this error trying to compile FPC on Linux x86_64.     streams.inc(1865,37) Error: Can't determine which overloaded function to call     classes.pp(57) Fatal: There were 1

Re: [fpc-pascal] FPC Lambda Runtime

2019-05-08 Thread Michael Van Canneyt
On Wed, 8 May 2019, Alan Krause wrote: FPC Community, Over the weekend I looked into AWS Lambda function custom runtimes, with the hope of being able to create one using Free Pascal. I'm happy to say that I have it up and running, and it produces a very small and quick runtime perfect for

Re: [fpc-pascal] error in https://www.freepascal.org/docs-html/rtl/strutils/ansiindextext.htm

2019-05-08 Thread Michael Van Canneyt
On Wed, 8 May 2019, Dennis wrote: I believe the red text below (in the url on the subject line) should be AnsiIndexText instead of AnsiIndexStr. Description AnsiIndexStr matches AText against each string in AValues . If a match is found, the corresponding index (zero-based) in the

Re: [fpc-pascal] Documentation confusion or error

2019-05-08 Thread Michael Van Canneyt
On Wed, 8 May 2019, Graeme Geldenhuys wrote: Hi, https://www.freepascal.org/docs-html/rtl/sysutils/longrec.html I'm referring to the documentation shown in the URL above. As far as I know the fpdoc is sensitive to which platform it is running on (unless explicitly told otherwise), and will

Re: [fpc-pascal] Does FPC require glibc?

2019-05-07 Thread Michael Van Canneyt
On Mon, 6 May 2019, Nozz via fpc-pascal wrote: On Monday, May 6, 2019 10:48 PM, Sven Barth wrote: Nozz via fpc-pascal schrieb am Mo., 6. Mai 2019, 22:18: Empty Message Depends on what you're using (and the platform). E.g. the compiler itself runs without glibc on Linux, but if you

Re: [fpc-pascal] XML - Indent, text content, special char

2019-04-28 Thread Michael Van Canneyt
On Sun, 28 Apr 2019, Gabor Boros wrote: 2019. 04. 28. 9:35 keltezéssel, Michael Van Canneyt írta: the newly exposed XMLWriter Will be merged/backported into fixes_3_2? I just merged it. Michael.___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] XML - Indent, text content, special char

2019-04-28 Thread Michael Van Canneyt
On Sun, 28 Apr 2019, Gabor Boros wrote: 2019. 04. 27. 13:57 keltezéssel, Michael Van Canneyt írta: As far as I know you can't. I recently changed some things in xmlwriter so you can influence the formatting to some degree, but no attempt is made to respect the formatting of a previously

Re: [fpc-pascal] XML - Indent, text content, special char

2019-04-27 Thread Michael Van Canneyt
On Sat, 27 Apr 2019, Gabor Boros wrote: Hi All, I have an existing XML file. After load(, modify) and save this file some mandatory formatting things lost from it. I need same indent as before, same text contents and not replace every special chars. With the below code I got the attached

Re: [fpc-pascal] Translating c records

2019-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2019, Rainer Stratmann wrote: struct sockaddr_ll { unsigned short sll_family; unsigned short sll_protocol; intsll_ifindex; unsigned short sll_hatype; unsigned char sll_pkttype; unsigned char sll_halen; unsigned char sll_addr[8]; };

Re: [fpc-pascal] {$warn 5024 off} does not work with FPC 3.2.0

2019-04-24 Thread Michael Van Canneyt
On Wed, 24 Apr 2019, Graeme Geldenhuys wrote: On 22/04/2019 00:14, Graeme Geldenhuys wrote: yet when I compile/build my project, it still shows that compiler hint (as can be seen in the attached screenshot). Is nobody else experiencing this? {$warn 5024 off} procedure

Re: [fpc-pascal] Record helper properties

2019-04-24 Thread Michael Van Canneyt
On Tue, 23 Apr 2019, Ryan Joseph wrote: On Apr 23, 2019, at 5:32 PM, Michael Van Canneyt wrote: That should be obvious: Because a helper can only add methods to a type, not additional storage space (memory). The basic type determines the memory layout of the data. A helper cannot

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Michael Van Canneyt
On Tue, 23 Apr 2019, Ryan Joseph wrote: So I remember now that any fields are not allowed in helpers. Can anyone explain why this must be the case or if it could be fixed? That should be obvious: Because a helper can only add methods to a type, not additional storage space (memory). The

[fpc-pascal] Website/Mantis back online

2019-04-20 Thread Michael Van Canneyt
Hi, The website has been restored to working order. SVN should be working again, Mantis has been updated to the latest version. We're still working on some features, for example emails are not yet being sent. Michael. ___ fpc-pascal maillist -

[fpc-pascal] SVN/Webserver maintenance

2019-04-20 Thread Michael Van Canneyt
Hello, This afternoon (for GMT+1) you will experience downtime in the website of FPC, The subversion service for FPC/Lazarus and the bugtracker. The host machine needs maintenance and this will result in some downtime of some services. FTP, Lazarus website, wiki and mailinglists will be

Re: [fpc-pascal] mode switch madness

2019-04-12 Thread Michael Van Canneyt
On Fri, 12 Apr 2019, Joao Schuler wrote: I would use something like {$include mysettings.inc} . Exactly. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] mode switch madness

2019-04-12 Thread Michael Van Canneyt
On Fri, 12 Apr 2019, Ryan Joseph wrote: On Apr 12, 2019, at 10:15 AM, Michael Van Canneyt wrote: That would break with the rule that directives do not cross unit boundaries. It has far-reaching consequences. Better introduce a command-line switch to set mode switches. But is it maybe

Re: [fpc-pascal] mode switch madness

2019-04-12 Thread Michael Van Canneyt
On Fri, 12 Apr 2019, Ryan Joseph wrote: Can I propose we add a new $modeswitch-all (or some equivalent) that globally sets modeswitch in all subsequent units? I’m thinking about how messy this list is getting after these new mode switches are added and that the problem is only going to

Re: [fpc-pascal] Helper/function overloads

2019-04-11 Thread Michael Van Canneyt
On Wed, 10 Apr 2019, Ryan Joseph wrote: Is this a bug or intended behavior? I can call it like Test.DoThis but it seems like overloading should work. {$mode objfpc} program test; type THelper = class helper for TObject procedure DoThis; overload; end; procedure DoThis (param:

Re: [fpc-pascal] Public key algo pascal only

2019-04-05 Thread Michael Van Canneyt
On Fri, 5 Apr 2019, José Mejuto wrote: Hello, Is there any public/private key algorithm, pascal only, implemented in the distribution of fpc ? Degree of security is not important, also a 3rd party unit which does not depends on a DLL or depends on another software to generate key pairs,

Re: [fpc-pascal] Web Server Written in Free Pascal?

2019-03-31 Thread Michael Van Canneyt
On Mon, 1 Apr 2019, Dennis wrote: Michael Van Canneyt wrote: On Wed, 27 Mar 2019, Anthony Walter wrote: No I haven't. I will check it out thank you. I just thought my implementation and interface was rather clean, simple, and easy to understand. I hope you'll be pleasantly surprised

Re: [fpc-pascal] Web Server Written in Free Pascal?

2019-03-27 Thread Michael Van Canneyt
On Wed, 27 Mar 2019, Anthony Walter wrote: No I haven't. I will check it out thank you. I just thought my implementation and interface was rather clean, simple, and easy to understand. I hope you'll be pleasantly surprised by the multitude of webprogramming tools available in FPC. This is

Re: [fpc-pascal] Web Server Written in Free Pascal?

2019-03-27 Thread Michael Van Canneyt
On Wed, 27 Mar 2019, Anthony Walter wrote: I've been tutoring kids on programming and using Free Pascal as their first computer language. I've been creating example programs to demonstrate different things computer can do and how certain technologies. In that endeavor I've written a basic

Re: [fpc-pascal] fpdoc: what does the --marco parameter do?

2019-03-24 Thread Michael Van Canneyt
On Sat, 23 Mar 2019, Graeme Geldenhuys wrote: The FPDoc PDF documentation for 3.0.4 doesn't mention it at all. So maybe it is something for 3.2.0 and later only? Yes. The XML project file needs some parametrization - for example the location of the sources. So it contains macros. The

Re: [fpc-pascal] fpPDF and support of Latin2 charset

2019-03-22 Thread Michael Van Canneyt
On Fri, 22 Mar 2019, LacaK wrote: I attached 2 patches to the bug tracker which solves the problem for me. 1. I can confirm, that in my case it is fixed for NO-embedded case only. For embedded fonts case there is still small issue (some characters are okay, some are shifted) - see

Re: [fpc-pascal] fpPDF and support of Latin2 charset

2019-03-20 Thread Michael Van Canneyt
I suspect that the Arial font has unicode glyphs, and courier not. I do not know, but with other fonts: Arial, Verdana, Consolas it works as expected. Do you think, that Courier New is only exception? When I look at https://docs.microsoft.com/en-us/typography/font-list/courier-new I do

Re: [fpc-pascal] fpPDF and support of Latin2 charset

2019-03-20 Thread Michael Van Canneyt
On Wed, 20 Mar 2019, LacaK wrote: Is there way how to get correct PDF file WITHOUT embedding full Courier font? You can embed only the needed characters for every font ? Probably yes, but fpPDF will not handle this automatically? AFAIK I can not control this. But why I get

Re: [fpc-pascal] fpPDF and support of Latin2 charset

2019-03-19 Thread Michael Van Canneyt
On Tue, 19 Mar 2019, LacaK wrote: Hi, I am trying work with fpPDF. I can create PDF document, but character out of ASCII range are displayed wrong (in PDF file they are stored as UTF8). Probably it is because I use standard Courier font, which is expecting only "Latin characters" ? I use:

Re: [fpc-pascal] how to make a type private to the unit but not defining it in the implementation section?

2019-03-07 Thread Michael Van Canneyt
On Thu, 7 Mar 2019, Dennis wrote: unit frproxyserver; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, Grids,   frBase; type   TMyStringGrid=class(TStringGrid) //how to I make this class visible only to this unit?   public   end;  

Re: [fpc-pascal] Need Advice: Teaching a Child Programming

2019-03-06 Thread Michael Van Canneyt
On Wed, 6 Mar 2019, Anthony Walter wrote: I need some advice from you guys. I might soon be teaching a child about computer programming and am considering using Free Pascal as the first language. The problem is the child is a distance away from me and I want a way to see his code as he types

Re: [fpc-pascal] CGI with datamodule does not work

2019-02-27 Thread Michael Van Canneyt
On Tue, 26 Feb 2019, AB wrote: Hi Guys, I have tried to update my old web project that is in maintenance mode since a few years now, using the latest stable Lazarus/FPC, and fcl-web just does not want to work (Tried Lazarus 1.8.4/FPC 3.0.4, Lazarus 2.0.0/FPC 3.0.4 with Apache 2.4, on

[fpc-pascal] New feature: SQLDB Rest bridge

2019-02-24 Thread Michael Van Canneyt
Hello, We received some feedback about Pas2JS - our effort to bring Pascal to the browser - that easy database connectivity is an issue, hampering easy development. To alleviate the problem I have created the SQLDB Rest bridge. This is a set of components that allow you to expose any

Re: [fpc-pascal] FGL.TFPSList Find method needed (binary search)

2019-02-17 Thread Michael Van Canneyt
On Sat, 16 Feb 2019, AlexeyT wrote: Hello. Can you pls, add Sorted property to TFPSList / TFPGList (Add() method must sort newly added item), and also Find method (which must use binary search in Sorted case, and use plain loop if not sorted)? You can use the rtl-generics

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Michael Van Canneyt
On Fri, 15 Feb 2019, Sven Barth via fpc-pascal wrote: Am Fr., 15. Feb. 2019, 18:54 hat Michael Van Canneyt geschrieben: I intend to copy it to ustrutils, which will be compiled with widestrings. Copying all routines to handle ansi/wide string is no solution. I hope you mean

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Michael Van Canneyt
I intend to copy it to ustrutils, which will be compiled with widestrings. Copying all routines to handle ansi/wide string is no solution. Michael. On Fri, 15 Feb 2019, AlexeyT wrote: According to one of new issues, StrUtils misses many funcs for UnicodeString: RPos, RPosEx Maybe someone

Re: [fpc-pascal] Documentation typo

2019-02-15 Thread Michael Van Canneyt
On Fri, 15 Feb 2019, Marco Borsari via fpc-pascal wrote: In the online html documentation, in the Programmer's Guide, at 1.2.4, it reads: "If it is + (the default) then the compiler will only evaluate as many terms as are necessary to determine the result of the complete expression."

Re: [fpc-pascal] CLI argument parsers (was: Resource compilation)

2019-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2019, Bart wrote: On Mon, Jan 14, 2019 at 12:56 AM Martok wrote: I'm a fan of getopts and use it (with a small wrapper) for almost everything (i. [2]), but it seems that many people are not aware it even exists. It's even POSIX compliant, so the program's users won't be

Re: [fpc-pascal] CLI argument parsers

2019-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2019, Martok wrote: I was 100% expecting that sort of answer. My invitation to suggest improvements, you mean ? I meant it: you're welcome to suggest improvements. If you implement something like argpars and it can be used as backend for TCustomApplication, I'm willing to

Re: [fpc-pascal] CLI argument parsers (was: Resource compilation)

2019-01-13 Thread Michael Van Canneyt
On Mon, 14 Jan 2019, Martok wrote: Am 13.01.2019 um 18:43 schrieb Michael Van Canneyt: Assuming you mean the command-line arguments: What's wrong/missing with the functionality in TCustomApplication ? Other than that nobody in the wild seems to fully use it? ;-) Your count is a little

Re: [fpc-pascal] Resource compilation

2019-01-13 Thread Michael Van Canneyt
On Sun, 13 Jan 2019, Martok wrote: To a lesser degree: something like Python's argparse would be nice. Everyone builds their own argument parser, usually with very different concepts and varying amounts of code duplication. Assuming you mean the command-line arguments: What's

Re: [fpc-pascal] type helpers

2019-01-11 Thread Michael Van Canneyt
On Fri, 11 Jan 2019, Sven Barth via fpc-pascal wrote: Am Fr., 11. Jan. 2019, 11:24 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: Hi, A type helper can change Self. I wondered how FPC 3.3.1 handles properties and got some unexpected results. Is this by

Re: [fpc-pascal] type helpers

2019-01-11 Thread Michael Van Canneyt
On Fri, 11 Jan 2019, Mattias Gaertner via fpc-pascal wrote: Hi, A type helper can change Self. I wondered how FPC 3.3.1 handles properties and got some unexpected results. Is this by design, a bug, or not-yet-implemented? Delphi acts the same, so for FPC: by design... You will see that

Re: [fpc-pascal] when will the size of an enumerated type change?

2019-01-09 Thread Michael Van Canneyt
On Wed, 9 Jan 2019, Dennis wrote: Type    TComparisonMode = (cmThisOnly, cmThisAndThat, cmThisOrThat); TMyClass = class public var    ComparisonMode : TComparisonMode; end; I discovered that, the sizeof(ComparisonMode) seem to be different depending on whether the type TComparisonMode is

Re: [fpc-pascal] SetLength warnings - request

2019-01-01 Thread Michael Van Canneyt
On Tue, 1 Jan 2019, Martok wrote: I'm curious to see them, because all 'issues' reported here can be perfectly repeated (possibly with some modifications) in Delphi. The non-initialization of 'Result' has bitten me more than once in Delphi. Aye. But it's rather rare in Delphi and very

Re: [fpc-pascal] SetLength warnings - request

2018-12-31 Thread Michael Van Canneyt
On Mon, 31 Dec 2018, Martok wrote: 1) Dynamic arrays are initialised with nil, but that is an implementation detail Is it, though? Global variables and instance fields are zero-filled, local variables as if the local variable block was a record passed to Initialize() (so, recursively

Re: [fpc-pascal] SetLength warnings - request

2018-12-30 Thread Michael Van Canneyt
On Sat, 29 Dec 2018, Jonas Maebe wrote: On 2018-12-29 22:00, Derek Edson wrote: Would it not be simpler to have the compiler initialize all dynamic array variables to nil, like for string variables, which should prevent the uninitialized warning/hint without requiring special treatment for

Re: [fpc-pascal] pas2js: Compiler options as Hints in SRC files

2018-12-20 Thread Michael Van Canneyt
On Thu, 20 Dec 2018, serge vertie wrote: Hi All! I want to use modules/functions/classes (generated from Pas sources by pas2js) from JS code, writed manually. In this case i can have some modules/functions/classes not used from other Pas modules (and intended to be used directly from JS).

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Michael Van Canneyt
> Hi all > > I decided to start a separate thread for asking about potential candidate > for crowd-funding. > > My personal wish-list is: > - support for array calculations / automatic loop parallelization via SSE, > AVX, etc. > Both static and dynamic arrays should supported. > Once

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Michael Van Canneyt
On Fri, 14 Dec 2018, OBones wrote: Michael Van Canneyt wrote: I think FreeOnTerminate should not even exist. IMO it should simply be 'True'. This is where I strongly disagree, to me it should always be False, because having things free up themselves at unpredictable times is a recipe

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Michael Van Canneyt
On Fri, 14 Dec 2018, Sven Barth via fpc-pascal wrote: Am Fr., 14. Dez. 2018, 10:31 hat Michael Van Canneyt geschrieben: On Fri, 14 Dec 2018, el es wrote: On 13/12/2018 22:23, Michael Van Canneyt wrote: On Thu, 13 Dec 2018, Martin Frb wrote: Besides, the documentation does

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Michael Van Canneyt
On Fri, 14 Dec 2018, OBones wrote: Michael Van Canneyt wrote: On Fri, 14 Dec 2018, el es wrote: On 13/12/2018 22:23, Michael Van Canneyt wrote: On Thu, 13 Dec 2018, Martin Frb wrote: Besides, the documentation does not say that FreeOnTerminate is limited to be used

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Michael Van Canneyt
On Fri, 14 Dec 2018, el es wrote: On 13/12/2018 22:23, Michael Van Canneyt wrote: On Thu, 13 Dec 2018, Martin Frb wrote: Besides, the documentation does not say that FreeOnTerminate is limited to be used in the thread construction. Especially since its effect is not due until

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-13 Thread Michael Van Canneyt
On Thu, 13 Dec 2018, Martin Frb wrote: Besides, the documentation does not say that FreeOnTerminate is limited to be used in the thread construction. Especially since its effect is not due until "terminate" For me this is a given. Almost by definition, changing anything in a thread

Re: [fpc-pascal] FPC-based http/s server

2018-12-10 Thread Michael Van Canneyt
On Mon, 10 Dec 2018, Mr Bee via fpc-pascal wrote: Hi all, Is there any open source, maintained and updated HTTP server using FPC out there? I need a lightweight HTTP server written in FPC that supports Linux/Unix, F/CGI app, and HTTPS. It'd be better if it doesn't need external or

Re: [fpc-pascal] precedence "is" and "and"

2018-12-09 Thread Michael Van Canneyt
On Sun, 9 Dec 2018, Marco van de Voort wrote: Because to the best of my knowledge, here isn't any difference in precedence, so there is nothing to explain. And that was what my post was, checking that. I'm more of the "more parenthesis never hurt anybody" school, so operator precedence

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Michael Van Canneyt
On Sat, 8 Dec 2018, Mattias Gaertner via fpc-pascal wrote: On Sat, 8 Dec 2018 22:03:11 +0100 (CET) Michael Van Canneyt wrote: [...] In delphi, AS is second level, and 'is' is fourth level. http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Expressions_(Delphi) If FPC does this differently

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Michael Van Canneyt
On Sat, 8 Dec 2018, Mattias Gaertner via fpc-pascal wrote: On Sat, 8 Dec 2018 21:23:57 +0100 Marco van de Voort wrote: Op 2018-12-08 om 20:38 schreef Mattias Gaertner via fpc-pascal: > According to the docs, the "is" operator is fourth level, the "and" > is second level, so the "and" must

[fpc-pascal] Proud to announce..

2018-12-05 Thread Michael Van Canneyt
Hello ! If anyone still doubted that Object Pascal is the best programming language, running on the most platforms: It is with considerable pride that I can announce a new major milestone has been reached in Free Pascal's pas2js story: The pas2js compiler runs now embedded in the browser

Re: [fpc-pascal] TStringList.DelimitedText seems not to work...

2018-11-19 Thread Michael Van Canneyt
On Mon, 19 Nov 2018, Bo Berglund wrote: FPC 3.0.4 with Lazarus 1.8.0 on Windows 7 x64 I am trying to use TStringList containers for parsing out values of this kind for sending to a database handler script: 2018-09-02 17:37:19134.027.6 ( = #9) I am using this construct, where Data holds the

Re: [fpc-pascal] fphttpclient.post

2018-11-01 Thread Michael Van Canneyt
On Thu, 1 Nov 2018, Ched wrote: Hello All, Thank you, Sven and Wkitty42, for having corrected a false assumption about encryption of url. Nevertheless, why not to have a simplepost(an-url, an-ansistring)::ansistring method available ? What should this do ? What does the ansistring

Re: [fpc-pascal] Case statements without constants?

2018-10-29 Thread Michael Van Canneyt
> I tried today to make a case that used variables instead of constants and > was surprised to get an error. I’m sure this been true since the 80’s but > why don’t cases allow variables??? I thought a case statement was just a > group of if..else blocks in succession. Case has never allowed

Re: [fpc-pascal] Cannot use SQLite 64 bit dll

2018-10-21 Thread Michael Van Canneyt
On Sun, 21 Oct 2018, Dennis wrote: A simple test here with a SQLite3Connection works without problems. Do you get an exception if the library is *not* located in the same folder? In that case it loaded correctly and something else must be the problem. Regards, Sven

Re: [fpc-pascal] Parse strings like "day-1" to convert in a time stamp

2018-10-15 Thread Michael Van Canneyt
> On Sun, Oct 14, 2018 at 8:19 PM Michael Van Canneyt > wrote: >> >> >> >> On Mon, 15 Oct 2018, Sven Barth via fpc-pascal wrote: >> >> > Marcos Douglas B. Santos schrieb am So., 14. Okt. >> 2018, >> > 16:15: >> > >> >&

Re: [fpc-pascal] Parse strings like "day-1" to convert in a time stamp

2018-10-14 Thread Michael Van Canneyt
On Mon, 15 Oct 2018, Sven Barth via fpc-pascal wrote: Marcos Douglas B. Santos schrieb am So., 14. Okt. 2018, 16:15: Do you know any Pascal lib to parse strings to convert in date/time values? The user is supposed to type human-friendly values like: - "day"=> trunc(now) - "day-2" =>

Re: [fpc-pascal] How to append data to a file of byte?

2018-10-14 Thread Michael Van Canneyt
On Sun, 14 Oct 2018, Bo Berglund wrote: It seems like I cannot use Append() on a file of byte. Neither is it allowed to use SeekEOF() on that file type... I want to log binary data to a logfile and therefore I need to open it for writing with record size =1 and the file pointer at the eof

Re: [fpc-pascal] any free pascal standard function to compare a string against an array of string?

2018-10-10 Thread Michael Van Canneyt
On Wed, 10 Oct 2018, Dennis wrote: is there a function like   if    IsOneOf('subtext', ['abc','cde','fecg','hig'])   then begin ... end; is there such a function IsOneOf(TheSubString : String; const TheStrings : array of String) : Boolean ? if yes, what is its name and unit? IndexStr in

Re: [fpc-pascal] Using REST based Services

2018-10-06 Thread Michael Van Canneyt
On Sat, 6 Oct 2018, Marc Santhoff wrote: Hi, being rather agnostic regarding web techniques I have to ask: What module or unit is best for being used when calling web services? fphttpclient is what you need. I want to try using Apache Tika running as a server for extracting the

Re: [fpc-pascal] with in classes/records

2018-10-04 Thread Michael Van Canneyt
On Thu, 4 Oct 2018, Ryan Joseph wrote: On Oct 4, 2018, at 8:34 PM, Michael Van Canneyt wrote: Technical issues aside, it kind of defeats the purpose of the default property... Then just tolerate the fact we have a dual meaning for assignments? Looks wrong but maybe not a problem. var

Re: [fpc-pascal] with in classes/records

2018-10-04 Thread Michael Van Canneyt
On Thu, 4 Oct 2018, Ryan Joseph wrote: On Sep 26, 2018, at 1:14 AM, Benito van der Zander wrote: Hi, perhaps everything would be clearer, if the default property was accessed with ^ ? var wrapper: TWrapper; begin wrapper := TWrapper.Create; wrapper^ :=

Re: [fpc-pascal] tprocess under linux and module

2018-09-18 Thread Michael Van Canneyt
On Mon, 17 Sep 2018, Gabriele Cappelletto via fpc-pascal wrote: ᅵ I have to execute the following instructions in tprocess: I manually write it like this: sudo su command inside a command there is a reference to a kernel module installed with sudo insmod. With the previous batch it

Re: [fpc-pascal] Free Pascal Language Diagram

2018-09-11 Thread Michael Van Canneyt
On Tue, 11 Sep 2018, Anthony Walter wrote: I posted this link once before, but I thought I'd remind you guys it exists and ask if anyone would like to take the work from the page, and integrate it into either the official documentation or maintain it somewhere on the free pascal website.

Re: [fpc-pascal] with in classes/records

2018-09-09 Thread Michael Van Canneyt
On Sun, 9 Sep 2018, Sven Barth via fpc-pascal wrote: Am 09.09.2018 um 16:16 schrieb Michael Van Canneyt: On Sun, 9 Sep 2018, Ryan Joseph wrote: It seems syntacticly possible that default properties could be recursive by having a default property reference a record/class with another

<    3   4   5   6   7   8   9   10   11   12   >