Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 15:08 hat Ryan Joseph geschrieben: > > You did read the part about the generic and the specialization being > located in two different units? šŸ˜‰ > > Oops. This still works so I guess it’s ok. > > program gc_ppu; > uses > gc_types_unit; > > var > a: specialize

Re: [fpc-pascal] Adding options when building packages

2018-11-27 Thread Dmitry Boyarintsev
On Tue, Nov 27, 2018 at 9:55 AM Ryan Joseph wrote: > > Is there is a way I can add > "-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/libā€ to that > command so it finds the file? > > make OPT='-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib ...extra options...'

[fpc-pascal] Adding options when building packages

2018-11-27 Thread Ryan Joseph
Since upgrading to Mac OS 10.14 a file has moved in the system which needs to be linked to. I’m able to work around this by adding a search path to the compiler options but when building the /packages directory from sources I run into problems: cd /Developer/ObjectivePascal/fpc-git/packages;mak

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Ryan Joseph
> On Nov 27, 2018, at 8:11 PM, Sven Barth via fpc-pascal > wrote: > > We can add a new message that says "type id or untyped constant expected". > But if it correctly errors right now, we can leave it be for now. > Fine by me. > You did read the part about the generic and the specializati

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 14:00 hat Ryan Joseph geschrieben: > > > > On Nov 27, 2018, at 5:35 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > 1) kSomeDays is a typed const so I get a load node instead of > tsetconstnode, which I need to need to know in order to make

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 12:03 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > On Tue, 27 Nov 2018 11:35:22 +0100 > Sven Barth via fpc-pascal wrote: > > >[...] > > > const > > > kSomeDays:TDays = [Mon, Wed]; > >[...] > > The difference between typed and

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Ryan Joseph
> On Nov 27, 2018, at 5:35 PM, Sven Barth via fpc-pascal > wrote: > > 1) kSomeDays is a typed const so I get a load node instead of tsetconstnode, > which I need to need to know in order to make the name string. See the TODO’s > in tgenericparamdef.create. > > type > TDay = (Mon, Tu

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Mattias Gaertner via fpc-pascal
On Tue, 27 Nov 2018 11:35:22 +0100 Sven Barth via fpc-pascal wrote: >[...] > > const > > kSomeDays:TDays = [Mon, Wed]; >[...] > The difference between typed and untyped constants are available > everywhere else in the language as well, so I have no qualms (at > least for now?) to error ou

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph geschrieben: > > > > On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Best check again once you've done the switch to tconstsym for constants. > :) > > > > I made most of the changes you mention

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Ryan Joseph
> On Nov 27, 2018, at 2:25 PM, denisgolovan wrote: > > Hi > > Sorry for breaking in, but I'd like to know if this functionality supports > specializing generic functions with const parameters? > > BR, > Denis Here’s my test which seems to be working. program gc_procs; generic procedure Do