Re: [fpc-pascal] Overriding generic methods

2017-02-10 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > type > TObjectListAbstract = specialize TList; > TObjectList = class (TObjectListAbstract) > procedure Add (value: T); override; > end; After specialization, the method signature now substitutes tobject for T, so try

Re: [fpc-pascal] Overriding generic methods

2017-02-10 Thread Ryan Joseph
Of course, I should have known. I’m just recently getting started on generics and finding some uses for them. Thanks. > On Feb 10, 2017, at 3:22 PM, Marco van de Voort wrote: > > After specialization, the method signature now substitutes tobject for T, so > try Regards, Ryan Joseph __

[fpc-pascal] uses myunit in '../src/myunit.pas' ?

2017-02-10 Thread fredvs
Hello. There is myprogram.pas in /home/me/myproject/example. This program uses myunit.pas from /home/me/myproject/src. myunit.pas uses myunit2.pas and myunit3.pas that are also in home/me/myproject/src. Using this: program myprogram; ... uses myunit in '../src/myunit.pas'; load indeed /home/m

Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?

2017-02-10 Thread Tim Veldhuizen
Unit names are considered to be unique, so strictly, for the compiler there is no need to specify the path explicitly in code when the unit path is given to the compiler when calling it from the command line. To do this, use the -Fu parameter when calling fpc to include ../src to the unit path