Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread Sven Barth via fpc-pascal
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

Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread Ryan Joseph
> 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

Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread Michael Van Canneyt
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

Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread 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 solution but it’s

Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread Michael Van Canneyt
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

Re: [fpc-pascal] fcl-passrc method/function invocations

2019-10-15 Thread Michael Van Canneyt
On Tue, 15 Oct 2019, Ryan Joseph wrote: On Oct 15, 2019, at 5:02 PM, Mattias Gaertner via fpc-pascal wrote: When parsing a program the module is a TPasProgram, which has a ProgramSection. Of course, thanks. A couple other questions if you don’t mind: 1) Are there any examples of the

Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread Benito van der Zander
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

Re: [fpc-pascal] fcl-passrc method/function invocations

2019-10-15 Thread Ryan Joseph
> On Oct 15, 2019, at 5:02 PM, Mattias Gaertner via fpc-pascal > wrote: > > When parsing a program the module is a TPasProgram, which has a > ProgramSection. Of course, thanks. A couple other questions if you don’t mind: 1) Are there any examples of the resolver? I’m looking through the

Re: [fpc-pascal] fcl-passrc method/function invocations

2019-10-15 Thread Mattias Gaertner via fpc-pascal
On Tue, 15 Oct 2019 16:38:35 -0400 Ryan Joseph wrote: > Another related question about functions. > > In unit files there is a InterfaceSection/ImplementationSection in > TPasModule and I can use those to get a list of functions (because > they descend from TPasSection). In a program file

Re: [fpc-pascal] fcl-passrc method/function invocations

2019-10-15 Thread Ryan Joseph
Another related question about functions. In unit files there is a InterfaceSection/ImplementationSection in TPasModule and I can use those to get a list of functions (because they descend from TPasSection). In a program file there only seems to be a InitializationSection but this doesn’t

Re: [fpc-pascal] Catalina upgrade changes

2019-10-15 Thread Jonas Maebe
On 2019-10-15 01:23, Anthony Walter wrote: Are there making lists for fpc macos? There is a (low volume) mailing list for Pascal programming on the Mac: https://lists.sonic.net/mailman/listinfo/mac-pascal The list is not specific to FPC, although the traditional Mac Pascal compilers