Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 23:25, Michael Van Canneyt wrote: I understand. But all depends on how the compiler parses and evaluates this. Let me put brackets to make it more clear: is MyTest.StringArray[i] parsed & evaluated as (MyTest.StringArray)([(i)]) or as (MyTest.StringArray[(i)]) In the former

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 21:04, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 19:38, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 18:21, Michael Van Canneyt wrote: On Mon, 1 Jul

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 21:04, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: If the compiler encounters "Mytest.StringArray" it can be evaluated only as the non-indexed overload. Well... We can of course discuss forever, and still not agree. I suggest we let the compiler people

[fpc-devel] State of i8086-embedded

2019-07-01 Thread Sven Barth via fpc-devel
Hello together! For a project at work I need to run 16-bit x86 code on a bare x86 hardware (more precisely a 8086 VM). Considering that i8086-embedded had been added to FPC nearly exactly 3 years ago I though I'd give it a try and cross compiled the units for the tiny memory model. However

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 21:04, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 19:38, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 18:21, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: From the above example

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 21:04, Michael Van Canneyt wrote: If the compiler encounters "Mytest.StringArray" it can be evaluated only as the non-indexed overload. Well... We can of course discuss forever, and still not agree. I suggest we let the compiler people have the last word on this. They know best.

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 19:38, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 18:21, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 15:57, Ryan Joseph wrote:   TTest = class   public    

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 19:38, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 18:21, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 15:57, Ryan Joseph wrote:   TTest = class   public     // ...     property StringArray[Index:

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 18:21, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 15:57, Ryan Joseph wrote: Yes, I’ve made a patch to allow overriding the actual property (https://bugs.freepascal.org/view.php?id=35772).

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 18:21, Michael Van Canneyt wrote: On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 15:57, Ryan Joseph wrote: Yes, I’ve made a patch to allow overriding the actual property (https://bugs.freepascal.org/view.php?id=35772). Very good! Just a short question: does your

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 18:21, Ryan Joseph wrote: On Jul 1, 2019, at 12:08 PM, Ondrej Pokorny wrote: Very good! Just a short question: does your solution allow one overload without array indexes? It is very useful as a for-in enumerator of the array property: TTest = class public // ...

[fpc-devel] AVR div, mod and shift operations for 64 bit math

2019-07-01 Thread Dimitrios Chr. Ioannidis via fpc-devel
Hi, did you find the time to review the patch in the issue ( https://bugs.freepascal.org/view.php?id=35691 ) ? IMHO, as I used it quite some time now, it does what it claims :) ... regards, -- Dimitrios Chr. Ioannidis ___ fpc-devel maillist -

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Michael Van Canneyt
On Mon, 1 Jul 2019, Ondrej Pokorny wrote: On 01.07.2019 15:57, Ryan Joseph wrote: Yes, I’ve made a patch to allow overriding the actual property (https://bugs.freepascal.org/view.php?id=35772). Very good! Just a short question: does your solution allow one overload without array indexes?

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ryan Joseph
> On Jul 1, 2019, at 12:08 PM, Ondrej Pokorny wrote: > > Very good! Just a short question: does your solution allow one overload > without array indexes? It is very useful as a for-in enumerator of the array > property: > > TTest = class > public > // ... > property

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Mattias Gaertner via fpc-devel
On Mon, 1 Jul 2019 11:38:31 -0400 Ryan Joseph wrote: > > On Jul 1, 2019, at 7:56 AM, Ondrej Pokorny > > wrote: > > > > type > > TValue = record A: Integer end; > > TMyClass = class > > function GetValue(index: integer): TValue; > > function GetValue(index: string): TValue; > >

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 15:57, Ryan Joseph wrote: Yes, I’ve made a patch to allow overriding the actual property (https://bugs.freepascal.org/view.php?id=35772). Very good! Just a short question: does your solution allow one overload without array indexes? It is very useful as a for-in enumerator of

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 01.07.2019 17:38, Ryan Joseph wrote: On Jul 1, 2019, at 7:56 AM, Ondrej Pokorny wrote: type TValue = record A: Integer end; TMyClass = class function GetValue(index: integer): TValue; function GetValue(index: string): TValue; property Index[aindex: integer]: TValue read

Re: [fpc-devel] fphttpclient cannot download a file from w3.org

2019-07-01 Thread Ondrej Pokorny
Thank you Michael for the response. I'll check what headers INDY sends. Ondrej On 01.07.2019 14:57, Michael Van Canneyt wrote: I tested: If I run a strace, it just hangs on the read operation: connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("128.30.52.100")}, 16) =

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ryan Joseph
> On Jul 1, 2019, at 7:56 AM, Ondrej Pokorny wrote: > > type > TValue = record A: Integer end; > TMyClass = class > function GetValue(index: integer): TValue; > function GetValue(index: string): TValue; > property Index[aindex: integer]: TValue read GetValue; default; > end;

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ryan Joseph
> On Jul 1, 2019, at 7:56 AM, Ondrej Pokorny wrote: > > Properties do allow overloading of the parameters. > > You only must not declare the overloaded properties but declare overloaded > getters/setters. The compiler will silently accept them. > >

Re: [fpc-devel] fphttpclient cannot download a file from w3.org

2019-07-01 Thread wkitty42
On 7/1/19 8:10 AM, Ondrej Pokorny wrote: Fails with exception: EHTTPClient Error reading data from socket #0 fpc_raiseexception(0x145fb14, 0x0, 0x) at ..\inc\except.inc:158 #1 FILLBUFFER(0x145fb14) at fcl-web\src\base\fphttpclient.pp:731 #2 READSTRING(0x15e1c30, 0x0) at

Re: [fpc-devel] fphttpclient cannot download a file from w3.org

2019-07-01 Thread Michael Van Canneyt
I tested: If I run a strace, it just hangs on the read operation: connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("128.30.52.100")}, 16) = -1 EINPROGRESS (Operation now in progress) select(4, NULL, [3], NULL, {tv_sec=3, tv_usec=0}) = 1 (out [3], left {tv_sec=2,

Re: [fpc-devel] [] property overloads

2019-07-01 Thread Ondrej Pokorny
On 20.06.2019 19:57, Ryan Joseph wrote: I just had some plans for a cool JSON class thwarted because apparently [] properties don’t allow overloading of the parameters. Can we allow multiple default properties as long as their parameters are different? Properties do allow overloading of the

[fpc-devel] fphttpclient cannot download a file from w3.org

2019-07-01 Thread Ondrej Pokorny
Hello, I cannot download http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd with TFPHTTPClient. Delphi INDY downloads it just fine. Does anybody know what I am missing? Test code: program Project1; uses Classes, SysUtils, fphttpclient; procedure DownloadFile(const