Am 15.10.2019 um 23:46 schrieb Ryan Joseph:
On Oct 15, 2019, at 5:26 PM, Benito van der Zander wrote:
you could do
var
it: pointer;
obj: TObject absolute it;
begin
for it in list do
begin
// continue on like before using “obj” instead of “it"
end;
That is a clever
> On Oct 15, 2019, at 6:13 PM, Michael Van Canneyt
> wrote:
>
> Of course there is: make the list the correct type. No typecasting needed
> then.
I guess I’ll get used to it but we have lots of code like this (snippet I
posted earlier from the parser):
Declarations: TFPList; // list of
On Tue, 15 Oct 2019, Ryan Joseph wrote:
On Oct 15, 2019, at 5:26 PM, Benito van der Zander wrote:
you could do
var
it: pointer;
obj: TObject absolute it;
begin
for it in list do
begin
// continue on like before using “obj” instead of “it"
end;
That is a clever solu
> On Oct 15, 2019, at 5:26 PM, Benito van der Zander wrote:
>
> you could do
>
> var
> it: pointer;
> obj: TObject absolute it;
> begin
> for it in list do
> begin
> // continue on like before using “obj” instead of “it"
> end;
>
That is a clever solution but it’s basical
On Tue, 15 Oct 2019, Benito van der Zander wrote:
Hi,
On 14.10.19 15:44, Ryan Joseph wrote:
var
it: pointer;
obj: TObject;
begin
for it in list do
begin
obj := TObject(it);
// continue on like before using “obj” instead of “it"
end;
That’s our realistic bes
Hi,
On 14.10.19 15:44, Ryan Joseph wrote:
var
it: pointer;
obj: TObject;
begin
for it in list do
begin
obj := TObject(it);
// continue on like before using “obj” instead of “it"
end;
That’s our realistic best use case now but it requires 2 extra steps. I hope
> On Oct 14, 2019, at 8:02 AM, Sven Barth via fpc-pascal
> wrote:
>
> No. Nothing of that. There is a variable in the for-in-loop and nothing more.
> Anything else currently is a bug and *will* break.
>
I don’t disagree with anything you’re saying but this is going to make for-in
loops mu
On Mon, 14 Oct 2019 14:02:44 +0200
Sven Barth via fpc-pascal wrote:
> Mattias Gaertner via fpc-pascal
> schrieb am Mo., 14. Okt. 2019, 10:39:
>[...]
> First you agree with me and then you provide in essence the same
> examples as Ryan? So what is it now?
Ryan gave several examples.
I agreed wit
Mattias Gaertner via fpc-pascal schrieb
am Mo., 14. Okt. 2019, 10:39:
> On Mon, 14 Oct 2019 07:37:38 +0200
> Sven Barth via fpc-pascal wrote:
>
> >[...]
> > Because the iterator returns a Pointer and not whatever you think it
> > might return. If you know it's something else, you cast that insid
On Mon, 14 Oct 2019, Mattias Gaertner via fpc-pascal wrote:
On Mon, 14 Oct 2019 07:37:38 +0200
Sven Barth via fpc-pascal wrote:
[...]
Because the iterator returns a Pointer and not whatever you think it
might return. If you know it's something else, you cast that inside
the loop.
I agre
On Mon, 14 Oct 2019 07:37:38 +0200
Sven Barth via fpc-pascal wrote:
>[...]
> Because the iterator returns a Pointer and not whatever you think it
> might return. If you know it's something else, you cast that inside
> the loop.
I agree with Sven.
What about the other way round?
For example th
Am 13.10.2019 um 23:19 schrieb Ryan Joseph:
On Oct 13, 2019, at 11:11 AM, Sven Barth via fpc-pascal
wrote:
Then specialize the list with the correct type.
This issue *will* be fixed and is not up to discussion.
Here’s some code from the parser today. TFPList is being used because it’s a
> On Oct 13, 2019, at 11:11 AM, Sven Barth via fpc-pascal
> wrote:
>
> Then specialize the list with the correct type.
>
> This issue *will* be fixed and is not up to discussion.
>
Here’s some code from the parser today. TFPList is being used because it’s a
generic storage for various di
On Sun, 13 Oct 2019, Ryan Joseph wrote:
On Oct 13, 2019, at 12:30 PM, Michael Van Canneyt
wrote:
Ahah...
That needs to be tested then. This seems to be a bug. Can you please create
a bug with a compilable example ?
- Please test the operator because I don’t think the parser understand
> On Oct 13, 2019, at 12:30 PM, Michael Van Canneyt
> wrote:
>
> Ahah...
>
> That needs to be tested then. This seems to be a bug. Can you please create
> a bug with a compilable example ?
>
>> - Please test the operator because I don’t think the parser understands it.
>
> OK, that's strang
On Sun, 13 Oct 2019, Michael Van Canneyt wrote:
- This is a new version from 3 days ago.
- The record sections failed because they are inside a function. If I pull
the record out of the function they work.
Ahah...
That needs to be tested then. This seems to be a bug. Can you please creat
On Sun, 13 Oct 2019, Ryan Joseph wrote:
To be clear:
here I meant that 'currently that will definitely not be done in fcl-passrc.'
This is a problem then because I wanted to make a language server for FPC
but if the parser doesn’t understand accepted FPC syntax the whole thing
falls apart.
Ryan Joseph schrieb am So., 13. Okt. 2019, 16:22:
>
>
> > On Oct 13, 2019, at 5:58 AM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> >> Delphi does not allow it:
> >>
> >> [dcc32 Error] Project1.dpr(18): E1019 For loop control variable must be
> simple local variable
> On Oct 13, 2019, at 5:58 AM, Sven Barth via fpc-pascal
> wrote:
>
>> Delphi does not allow it:
>>
>> [dcc32 Error] Project1.dpr(18): E1019 For loop control variable must be
>> simple local variable
>>
>> I don't think this should be allowed, either.
>
> Same.
Why not?
I just had this p
> On Oct 13, 2019, at 6:18 AM, Michael Van Canneyt
> wrote:
>
>>> Well spotted. I didn't notice that the extension was missing.
>>>
>>> That will definitely not be done in fcl-passrc.
>
> To be clear:
>
> here I meant that 'currently that will definitely not be done in fcl-passrc.'
This i
On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote:
Could the missing ".inc" be the problem? I have not checked, but it
could
be that FPC always adds ".inc" if no extension is present.
Well spotted. I didn't notice that the extension was missing.
That will definitely not be done in fcl-p
Am 13.10.2019 um 11:26 schrieb Michael Van Canneyt:
On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote:
Just type casting because the array is an array of pointers. I get
these
errors otherwise "Incompatible types: got "Pointer"
expected “TEntity"”. I could use a proper type in a generic a
On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote:
Just type casting because the array is an array of pointers. I get these
errors otherwise "Incompatible types: got "Pointer"
expected “TEntity"”. I could use a proper type in a generic array but I
don’t always do that.
I didn't know you
Michael Van Canneyt schrieb am So., 13. Okt. 2019,
08:20:
> > 2) For..in loops
> >
> > EParserError: Expected := or in at token "(" in file
> >
>
> /Users/ryanjoseph/Developer/Projects/FPC/NewEngine/Sources/Examples/EmptyWindow.pas
> at line 138 column
> > 1
On Sat, 12 Oct 2019, Ryan Joseph wrote:
On Oct 12, 2019, at 6:43 PM, Michael Van Canneyt
wrote:
1) class operators for records
EParserError: Expected "procedure" at token "operator" in file
/Users/ryanjoseph/Developer/Projects/FPC/GLCanvas/GLCanv
On Oct 12, 2019, at 6:43 PM, Michael Van Canneyt wrote:1) class operators for recordsEParserError: Expected "procedure" at token "operator" in file /Users/ryanjoseph/Developer/Projects/FPC/GLCanvas/GLCanvas.pas at line 115 column 7class operator TVertex3.= (constref a, b: TVertex3): boolean;beginr
On Sat, 12 Oct 2019, Ryan Joseph wrote:
More tests with the parser but it seems like it doesn’t know quite a bit of
syntax. Are these not implemented yet?
1) class operators for records
EParserError: Expected "procedure" at token "operator" in file
/Users/ryanjoseph/Developer/Projects/FPC/
27 matches
Mail list logo