[fpc-devel] generics with type-identifier "object" - documented yes, but ...?

2022-03-04 Thread Martin Frb via fpc-devel
According to  https://www.freepascal.org/docs-html/ref/refse53.html the keyword "object" is allowed as a "type identifier" for identifiers in the "template list" of a generic definition. Yet, the below does not compile (tested with 3.2.0 / 3.2.2 / 3.2.3 and 3.3.1 from 2022-Feb-10) program Pr

Re: [fpc-devel] Generics-related compilation issue

2021-01-05 Thread Bart via fpc-devel
I filed a bugreport: https://bugs.freepascal.org/view.php?id=38309 -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] Generics-related compilation issue

2021-01-04 Thread Bart via fpc-devel
On Mon, Jan 4, 2021 at 11:00 PM Bart wrote: > So, most likely this has nothing to do with generics? > I'm using r47193 of fpc trunk Try to compile attached program for Win64-bit with either 3.2.0 or trunk: Free Pascal Compiler version 3.2.0 [2020/06/04] for x86_64 Copyright (c) 1993-2020 by Flo

Re: [fpc-devel] Generics-related compilation issue

2021-01-04 Thread Bart via fpc-devel
On Mon, Jan 4, 2021 at 5:13 PM Bart wrote: > > > What is strange to me is that the compilation issue does not happen with > > the LazControls package alone, but only when ExCtrls package is added. > > Moreover, the problem occurs only on 64bit, not on 32 bit. (I am on Windows) 64-bit Windows: Com

Re: [fpc-devel] Generics-related compilation issue

2021-01-04 Thread Bart via fpc-devel
On Mon, Jan 4, 2021 at 12:57 PM Werner Pamler via fpc-devel wrote: > What is strange to me is that the compilation issue does not happen with > the LazControls package alone, but only when ExCtrls package is added. > Moreover, the problem occurs only on 64bit, not on 32 bit. (I am on Windows) Cu

[fpc-devel] Generics-related compilation issue

2021-01-04 Thread Werner Pamler via fpc-devel
A happy, successful and healthy New Year to everybody! I have a generics related compilation issue in my package ExCtrls package (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/exctrls/). This package contains a TCurrencySpinEditEx component which inherits from the TSpinEditEx

Re: [fpc-devel] Generics: issue with double inline specialization

2016-10-26 Thread Sven Barth
Am 25.10.2016 08:07 schrieb "Martok" : > Before submitting this to the bugtracker, 3 questions: does this look sane in > general? I'll try to take a look at it this weekend. But at work we're currently rather busy (shortly before a new release of our main software), so no promises though... (As I'

[fpc-devel] Generics: issue with double inline specialization

2016-09-30 Thread Martok
Hi everyone, I had already reported the issue as , but as this problem is currently blocking a clean solution in a project for us, I'm asking for help again here. The problem appears to be that when a generic uses its type parameter to inline-speciali

Re: [fpc-devel] Generics collections

2016-07-31 Thread Maciej Izak
2016-07-30 18:40 GMT+02:00 Sven Barth : > please check the changes I've made (they're mentioned both in the commit > as well as the issue). > > merged into github repo > Maybe you should add an "experimental" modifier to these types so that one > knows that they're unstable. > I've made that lon

Re: [fpc-devel] Generics collections

2016-07-30 Thread Sven Barth
Am 30.07.2016 18:10 schrieb "Maciej Izak" : > > Impossible! :O *Finally*! Thanks Sven! Totally unexpected event. ;) Expect the unexpected :P > I'd like to use Generics.Collections in stable release ASAP but... IMO best version for release is 3.2 (even 3.0.4 is probably to early). I need to review

Re: [fpc-devel] Generics collections

2016-07-30 Thread Maciej Izak
Impossible! :O *Finally*! Thanks Sven! Totally unexpected event. ;) I'd like to use Generics.Collections in stable release ASAP but... IMO best version for release is 3.2 (even 3.0.4 is probably to early). I need to review latest changes in trunk for generics to correct library (package?) code, be

[fpc-devel] Generics collections

2016-07-29 Thread Dimitrios Chr. Ioannidis
Hi, is there a chance to merge the generics collections 34229 commit from trunk to 3.0 fixes ( a.k.a. 3.0.2 soon to be ) also ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.o

Re: [fpc-devel] generics and scoping rules

2015-05-09 Thread Sven Barth
Am 08.05.2015 23:56 schrieb "Martin Frb" : > > What are the scoping rules? > > Example: > > TLazStorageMemBase = object > private > const > CNT_OFFS = SizeOf(Pointer); > DATA_OFFS = CNT_OFFS + (2 * SizeOf(Integer)); > private > FMem: PByte; > function GetCapacity: Integer;

[fpc-devel] generics and scoping rules

2015-05-08 Thread Martin Frb
What are the scoping rules? Example: TLazStorageMemBase = object private const CNT_OFFS = SizeOf(Pointer); DATA_OFFS = CNT_OFFS + (2 * SizeOf(Integer)); private FMem: PByte; function GetCapacity: Integer; inline; function GetCount: Integer; inline; . end; ge

Re: [fpc-devel] Generics, TObject Descendant?

2015-02-20 Thread Den
Ahh, thanks Sven! I'll see if I can post a bug report soon of it.. I'll use the work-around for now. :) On 2015-02-19 12:22 AM, Sven Barth wrote: On 18.02.2015 20:51, Den wrote: Hi there, Currently this code: TSomeObject = Class; TSomeOtherObject = Class(TSomeObject ); And finally:

Re: [fpc-devel] Generics, TObject Descendant?

2015-02-18 Thread Sven Barth
On 18.02.2015 20:51, Den wrote: Hi there, Currently this code: TSomeObject = Class; TSomeOtherObject = Class(TSomeObject ); And finally: TMyObject = Class; TSomeOtherOtherObject = Class(TSomeOtherObject ); Comes up with error 'got "T" expected "TObject"' .. But TMyObject is based

[fpc-devel] Generics, TObject Descendant?

2015-02-18 Thread Den
Hi there, Currently this code: TSomeObject = Class; TSomeOtherObject = Class(TSomeObject ); And finally: TMyObject = Class; TSomeOtherOtherObject = Class(TSomeOtherObject ); Comes up with error 'got "T" expected "TObject"' .. But TMyObject is based off of TObject? - Dennis

Re: [fpc-devel] Generics are still broken

2012-05-12 Thread Anthony Walter
Okay Sven I'll be using the bug tracker with the "generics" to assist in the best way I can. I just added an issue for the problem I mentioned which I believe was previously an undocumented issue. Issue #22019 http://bugs.freepascal.org/view.php?id=22019 ___

Re: [fpc-devel] Generics are still broken

2012-05-12 Thread Sven Barth
On 11.05.2012 22:58, Anthony Walter wrote: Thanks Sven. Overall generics in Fpc are very much improved. So good work! Your work is much appreciated! I also experienced some different problems with classes which implement generic interfaces where the compiler thinks that method aren't implement.

Re: [fpc-devel] Generics are still broken

2012-05-11 Thread Anthony Walter
Thanks Sven. Overall generics in Fpc are very much improved. So good work! Your work is much appreciated! I also experienced some different problems with classes which implement generic interfaces where the compiler thinks that method aren't implement. On my blog I have a page where I describe mu

Re: [fpc-devel] Generics are still broken

2012-05-11 Thread Sven Barth
On 11.05.2012 20:10, Anthony Walter wrote: Okay with the latest trunk version I tried compiling my generic classes. It seems there is a problem with fpc generics in that you cannot use a generic as a type parameter. e.g type TDictionary = class(TEnumerable>) ... Yes, this is a known problem and

Re: [fpc-devel] Generics are still broken

2012-05-11 Thread Anthony Walter
Okay with the latest trunk version I tried compiling my generic classes. It seems there is a problem with fpc generics in that you cannot use a generic as a type parameter. e.g type TDictionary = class(TEnumerable>) ... Given: type TCollection = class end; TPair = class Key: K; Val

Re: [fpc-devel] Generics are still broken

2012-05-11 Thread Anthony Walter
The example problem I listed seems to be fixed in trunk. I'll write a few more examples. Thank you FPC development team! ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Generics are still broken

2012-05-11 Thread Anthony Walter
Okay, i'll try getting trunk sources from svn and building. I'll reporting back shortly. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Generics are still broken

2012-05-11 Thread JC Chu
It will compile correctly with the trunk version. Generics support has been greatly improved in the trunk version; you may want to give it a try. On May 12, at 00:11, Anthony Walter wrote: > Generics still have a lot of problems. I know they've been in the works > for years but they still fail

[fpc-devel] Generics are still broken

2012-05-11 Thread Anthony Walter
Generics still have a lot of problems. I know they've been in the works for years but they still fail easily. Consider the Delphi mode below, I get "Error: Generics without specialization cannot be used as a type for a variable" I could easily write up a whole bunch of test cases were generic sti

Re: [fpc-devel] Generics - a general question

2011-11-19 Thread AvP
First, thanks for the detailed answer! This information may be useful for others, so I put it into the wiki: http://wiki.freepascal.org/Generics#Technical_details. Maybe there is a better place for that... A.v.P. ___ fpc-devel maillist - fpc-devel@li

Re: [fpc-devel] Generics - a general question

2011-11-19 Thread Sven Barth
On 19.11.2011 09:33, AvP wrote: Simply replacing "object" by "class" is not sufficient, because classes need to be used differently than objects. Right, it actually needs a bit of modification in the destructor. ;-) I haven't yet tried to replicate your example with classes, so I can't say wh

Re: [fpc-devel] Generics - a general question

2011-11-19 Thread AvP
First of all, thanks for your answer. I tried to make the example as simple as possible - and simply forgot to allocate the memory :$ > Simply replacing "object" by "class" is not sufficient, because classes > need to be used differently than objects. Right, it actually needs a bit of modificatio

Re: [fpc-devel] Generics - a general question

2011-11-18 Thread Sven Barth
On 18.11.2011 21:12, Sven Barth wrote: Please note: While this is how it SHOULD work this does currently not work with any version of the compiler except maybe my generic branch (I haven't tested that yet). Ok, I have tested that with my branch and it doesn't work there either. After thinking

Re: [fpc-devel] Generics - a general question

2011-11-18 Thread Sven Barth
On 18.11.2011 18:31, AvP wrote: 1. Is this behavior intended (generic objects)? I didn't find anything like that in the docs It's at least not forbidden. I can imagine though that it was forgotten to document as objects aren't used by that many persons (and thus they are forgotten rather

[fpc-devel] Generics - a general question

2011-11-18 Thread AvP
I just made a first attempt to use generics. Trying different things I figured out that the appended code compiles without any error message in FPC 2.6.0RC1 1. Is this behavior intended (generic objects)? I didn't find anything like that in the docs 2. Replacing "object" at (1) with "class" gi

Re: [fpc-devel] Generics in FPC have many problems

2011-08-30 Thread Sven Barth
Am 30.08.2011 03:06, schrieb Anthony Walter: Tonight I tried to "make all" from your branch and wasn't able to build. This is a the output I got: http://pastebin.com/GQh5XA2w I am guessing your build requires a working version of your fpc binary to build itself. The errors you see are already

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Anthony Walter
Sven, Tonight I tried to "make all" from your branch and wasn't able to build. This is a the output I got: http://pastebin.com/GQh5XA2w I am guessing your build requires a working version of your fpc binary to build itself. Also, I wrote a few of pretty clean test cases in Delphi 2010 Today whe

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Sven Barth
Wow, Sven, thanks for the reply, and most definitely thanks for working on FPC. Anything I can do to help I'll do. Last week I sent patches to fix issues with Lazarus CodeTools and the new generic syntax which basically caused a lot of problems in the IDE. I'll be on freenode irc in both #fpc and

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Anthony Walter
On Mon, Aug 29, 2011 at 11:19 AM, Sven Barth wrote: > Hi! > > As Paul and Jonas already told you, I'm currently working on improving the > compilers generic implementation. As you have noticed it currently doesn't > support generic methods and constraints at all. Also the generic > implementation

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Sven Barth
Hi! As Paul and Jonas already told you, I'm currently working on improving the compilers generic implementation. As you have noticed it currently doesn't support generic methods and constraints at all. Also the generic implementation in mode Delphi isn't working correctly as you've noticed. I

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Jonas Maebe
On 29 Aug 2011, at 16:50, Anthony Walter wrote: Btw, where would be a good place to follow your progress on JVm support? Here :) And also the svn commit log of http://svn.freepascal.org/svn/fpc/branches/jvmbackend , as well as http://wiki.freepascal.org/FPC_JVM and its subpages (probably e

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Anthony Walter
Thanks Jonas. Btw, where would be a good place to follow your progress on JVm support? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Jonas Maebe
On 29 Aug 2011, at 16:23, Anthony Walter wrote: Paul, thanks for the reply. Did you mean to say that the generics are actually being improved ... that is that someday you might be able to say: procedure TMyNonGenericClass.MyGenericMethod(List: TList); Or that the random seeming bugs with t

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Anthony Walter
Oh, and FPC generics really need the ability to add constraints ... e.g. type TObjectList = class TList ... end; ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Anthony Walter
On Mon, Aug 29, 2011 at 10:15 AM, Paul Ishenin wrote: > Yes. These are known problems and you would found even more a year ago. > Sven Barth now trying to fix exising problems and implement missing things. > > If you wish to try fix them yourself you need to study how parser part of > the compile

Re: [fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Paul Ishenin
29.08.2011 21:52, Anthony Walter wrote: Jump to "So here are some of the problems I've found with fpc generics" if you don't want to read the backstory. ... And if someone ever does intent to fix generics in FPC, there are a whole slew of errors that they already bring into the compiler. I'll

[fpc-devel] Generics in FPC have many problems

2011-08-29 Thread Anthony Walter
Jump to "So here are some of the problems I've found with fpc generics" if you don't want to read the backstory. I haven't been active in the FPC for a while, but last week I was asking some questions about the upcoming Delphi FireMonkey project which is supposed to allow broader development with

Re: [fpc-devel] Generics - anyone working on them?

2010-11-23 Thread Florian Klämpfl
Am 23.11.2010 20:18, schrieb Aleksa Todorovic: > Hi! > > I've attached several patches regarding generics some time ago > (http://bugs.freepascal.org/view.php?id=15875, > http://bugs.freepascal.org/view.php?id=11777), but there was no > response regarding them. Is anyone from fpc developers workin

[fpc-devel] Generics - anyone working on them?

2010-11-23 Thread Aleksa Todorovic
Hi! I've attached several patches regarding generics some time ago (http://bugs.freepascal.org/view.php?id=15875, http://bugs.freepascal.org/view.php?id=11777), but there was no response regarding them. Is anyone from fpc developers working on generics currently (improving/maintaining/fixing/apply

Re: [fpc-devel] Generics syntax error

2010-09-29 Thread Sven Barth
Am 29.09.2010 09:06, schrieb Sven Barth: Am 29.09.2010 00:54, schrieb Willibald Krenn: Hi! I'm having this issue, too, but with 2.4.3. The following example code fails with FPC 2.4.2 RC1 as well (system is i386-win32): Tried that with trunk and it compiled fine. (FPC 2.5 on win64) I also

Re: [fpc-devel] Generics syntax error

2010-09-29 Thread Sven Barth
Am 29.09.2010 00:54, schrieb Willibald Krenn: Hi! I'm having this issue, too, but with 2.4.3. The following example code fails with FPC 2.4.2 RC1 as well (system is i386-win32): Tried that with trunk and it compiled fine. (FPC 2.5 on win64) I also tested with a 2.5.1 version from August (

Re: [fpc-devel] Generics syntax error

2010-09-28 Thread Willibald Krenn
Hi! I'm having this issue, too, but with 2.4.3. The following example code fails with FPC 2.4.2 RC1 as well (system is i386-win32): Tried that with trunk and it compiled fine. (FPC 2.5 on win64) Cheers, Willi ___ fpc-devel maillist - fpc-devel@

Re: [fpc-devel] Generics syntax error

2010-09-28 Thread Sven Barth
Am 27.09.2010 14:21, schrieb Sven Barth: I'm having this issue, too, but with 2.4.3. The following example code fails with FPC 2.4.2 RC1 as well (system is i386-win32): program generictest; {$mode objfpc}{$H+} uses fgl; type TTest = specialize TFPGList; begin end. 2.4.0

Re: [fpc-devel] Generics syntax error

2010-09-27 Thread Sven Barth
Am 22.09.2010 15:59, schrieb Felipe Monteiro de Carvalho: Hello, Has anyone experienced issues with generics? I have the following code: unit cdescreen; {$mode delphi} interface uses // LCL, RTL, FCL Classes, SysUtils, Controls, Graphics, LCLType, SDFData, fpimage, fgl, // cde

[fpc-devel] Generics syntax error

2010-09-22 Thread Felipe Monteiro de Carvalho
Hello, Has anyone experienced issues with generics? I have the following code: unit cdescreen; {$mode delphi} interface uses // LCL, RTL, FCL Classes, SysUtils, Controls, Graphics, LCLType, SDFData, fpimage, fgl, // cdeconfig, cdeprovinces, cdeutils, cdegame, cdetypes, dlgstatus; ty

[fpc-devel] Generics problem

2010-05-25 Thread Andrew Brunner
I've just encountered a generics problem and wanted to know if it was intentional... uGenerics.pas generic GObjectList<_T>=class(TList) private FIndex : integer; private function Get(Index:integer): _T; procedure Put(Index:integer; Item:_T); public constructor

[fpc-devel] generics with is operator

2010-01-24 Thread darekm
Hi I found problem with is operator using with generics This program is not compile error is: Class or Object types "TList$LongInt" and "TList$ShortString" are not related But I think it should be possible {$mode objfpc} type generic TList<_T>=class(TObject) public data : _T; pr

Re: [fpc-devel] Generics

2009-10-22 Thread Jonas Maebe
On 21 Oct 2009, at 19:08, David B Copeland wrote: On Wed, 2009-10-21 at 15:54 +0200, Jonas Maebe wrote: Generics still don't work 100%, In what way is Generics not 100%? There are problems with using inheritance, e.g. http://bugs.freepascal.org/view.php?id=12249 and http://svn.freepascal

Re: [fpc-devel] Generics

2009-10-21 Thread Alexander Klenin
On Thu, Oct 22, 2009 at 04:08, David B Copeland wrote: > In what way is Generics not 100%? > > Dave Copeland. For me at least, the gravest problem is a lack of function-level generics. -- Alexander S. Klenin ___ fpc-devel maillist - fpc-devel@lists.

Re: [fpc-devel] Generics

2009-10-21 Thread David B Copeland
On Wed, 2009-10-21 at 15:54 +0200, Jonas Maebe wrote: > On 21 Oct 2009, at 14:55, Marco van de Voort wrote: > > Generics still don't work 100%, > > > Jonas > In what way is Generics not 100%? Dave Copeland. ___ fpc-devel maillist - fpc-devel@

Re: [fpc-devel] Generics basic library

2008-01-17 Thread Felipe Monteiro de Carvalho
On Jan 17, 2008 9:01 PM, Peter Vreman <[EMAIL PROTECTED]> wrote: > See the fgl unit in current 2.2.1 or 2.3.1. Generics were not stable > enough in the past to have the unit already enabled in 2.2.0. Oh, thanks. In my search I had actually found this unit, but then I looked at the unit name and sa

Re: [fpc-devel] Generics basic library

2008-01-17 Thread Peter Vreman
At 20:56 17-1-2008, you wrote: Hi Felipe, I have never gotten onto the band wagon regarding Generics. I have only seen the word being tossed around on the mailing lists and newsgroups. Do you maybe have a nice link explaining Generics, what benefits it has over TList (TObjectList and friends) a

Re: [fpc-devel] Generics basic library

2008-01-17 Thread Peter Vreman
At 20:40 17-1-2008, you wrote: Hello, I was coding and I suddently saw that need to use a typed list. I went with TFPList, but considering we already have compiler support I thougth that maybe we could have a basic library with useful classes using generics. I searched on fpc 2.2.0 sources a lot

Re: [fpc-devel] Generics basic library

2008-01-17 Thread Graeme Geldenhuys
Hi Felipe, I have never gotten onto the band wagon regarding Generics. I have only seen the word being tossed around on the mailing lists and newsgroups. Do you maybe have a nice link explaining Generics, what benefits it has over TList (TObjectList and friends) and what I would use it for? I ga

[fpc-devel] Generics basic library

2008-01-17 Thread Felipe Monteiro de Carvalho
Hello, I was coding and I suddently saw that need to use a typed list. I went with TFPList, but considering we already have compiler support I thougth that maybe we could have a basic library with useful classes using generics. I searched on fpc 2.2.0 sources a lot, but I couldn't find anything.

Re: [fpc-devel] Generics

2007-08-17 Thread Bram Kuijvenhoven
Florian Klaempfl wrote: Mattias Gaertner schrieb: For example, this is currently not allowed: generic TTree = class(TObject) type public TTreeNode = specialize TNode; end; And this neither: generic TTree = class(TObject) type public TTreeNode = class Data: T; end;

Re: [fpc-devel] Generics

2007-08-17 Thread Micha Nelissen
Mattias Gaertner wrote: For example, this is currently not allowed: generic TTree = class(TObject) type public TTreeNode = specialize TNode; end; Shouldn't this be allowed? Perhaps it can only work with a complete TTreeNode description, probably the TNode is specific for use by T

Re: [fpc-devel] Generics

2007-08-17 Thread Mattias Gaertner
On Fri, 17 Aug 2007 10:20:13 +0200 (CEST) Michael Van Canneyt <[EMAIL PROTECTED]> wrote: >[...] > > > > > What local types are/will be allowed? > > > > > > > > > > For example, this is currently not allowed: > > > > > > > > > > generic TTree = class(TObject) > > > > > type public TTreeNode =

Re: [fpc-devel] Generics

2007-08-17 Thread Michael Van Canneyt
On Fri, 17 Aug 2007, Florian Klaempfl wrote: > Michael Van Canneyt schrieb: > > > > On Fri, 17 Aug 2007, Florian Klaempfl wrote: > > > > > Mattias Gaertner schrieb: > > > > On Thu, 16 Aug 2007 23:31:25 +0200 (CEST) > > > > Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > > > > > > > [...]

Re: [fpc-devel] Generics

2007-08-17 Thread Florian Klaempfl
Michael Van Canneyt schrieb: On Fri, 17 Aug 2007, Florian Klaempfl wrote: Mattias Gaertner schrieb: On Thu, 16 Aug 2007 23:31:25 +0200 (CEST) Michael Van Canneyt <[EMAIL PROTECTED]> wrote: [...] Why is the local variable block needed? It is not. I asked the same question. It was added for

Re: [fpc-devel] Generics

2007-08-17 Thread Michael Van Canneyt
On Fri, 17 Aug 2007, Florian Klaempfl wrote: > Mattias Gaertner schrieb: > > On Thu, 16 Aug 2007 23:31:25 +0200 (CEST) > > Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > > > [...] > > > > Why is the local variable block needed? > > > It is not. I asked the same question. It was added for

Re: [fpc-devel] Generics

2007-08-17 Thread Florian Klaempfl
Mattias Gaertner schrieb: On Thu, 16 Aug 2007 23:31:25 +0200 (CEST) Michael Van Canneyt <[EMAIL PROTECTED]> wrote: [...] Why is the local variable block needed? It is not. I asked the same question. It was added for symmetry reasons: if a local type block is allowed, then a var block should a

Re: [fpc-devel] Generics

2007-08-16 Thread Mattias Gaertner
On Thu, 16 Aug 2007 23:31:25 +0200 (CEST) Michael Van Canneyt <[EMAIL PROTECTED]> wrote: >[...] > > Why is the local variable block needed? > > It is not. I asked the same question. It was added for symmetry > reasons: if a local type block is allowed, then a var block should > also be allowed. >

Re: [fpc-devel] Generics

2007-08-16 Thread Michael Van Canneyt
On Thu, 16 Aug 2007, Mattias Gaertner wrote: > On Thu, 16 Aug 2007 14:59:47 -0500 (CDT) > Jesus Reyes <[EMAIL PROTECTED]> wrote: > > > > > --- Jesus Reyes <[EMAIL PROTECTED]> escribió: > > > > > > > > --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió: > > > > > > > > > > > > > > > On T

Re: [fpc-devel] Generics

2007-08-16 Thread Mattias Gaertner
On Thu, 16 Aug 2007 14:59:47 -0500 (CDT) Jesus Reyes <[EMAIL PROTECTED]> wrote: > > --- Jesus Reyes <[EMAIL PROTECTED]> escribió: > > > > > --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió: > > > > > > > > > > > On Thu, 16 Aug 2007, Mattias Gaertner wrote: > > > > > > > > > > > What is

Re: [fpc-devel] Generics

2007-08-16 Thread Michael Van Canneyt
On Thu, 16 Aug 2007, Jesus Reyes wrote: > > --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió: > > > > > > > On Thu, 16 Aug 2007, Mattias Gaertner wrote: > > > > > > > > What is the state and future plans of generics? > > > I only found the wiki page > > > > > > http://wiki.lazarus.fre

Re: [fpc-devel] Generics

2007-08-16 Thread Jesus Reyes
--- Jesus Reyes <[EMAIL PROTECTED]> escribió: > > --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió: > > > > > > > On Thu, 16 Aug 2007, Mattias Gaertner wrote: > > > > > > > > What is the state and future plans of generics? > > > I only found the wiki page > > > > > > http://wiki.lazaru

Re: [fpc-devel] Generics

2007-08-16 Thread Jesus Reyes
--- Michael Van Canneyt <[EMAIL PROTECTED]> escribió: > > > On Thu, 16 Aug 2007, Mattias Gaertner wrote: > > > > > What is the state and future plans of generics? > > I only found the wiki page > > > > http://wiki.lazarus.freepascal.org/Generics > > > > which does not even mention the curre

Re: [fpc-devel] Generics

2007-08-16 Thread Michael Van Canneyt
On Thu, 16 Aug 2007, Mattias Gaertner wrote: > > What is the state and future plans of generics? > I only found the wiki page > > http://wiki.lazarus.freepascal.org/Generics > > which does not even mention the current syntax. The current syntax is descibed in the docs, reference manual. Ther

[fpc-devel] Generics

2007-08-16 Thread Mattias Gaertner
What is the state and future plans of generics? I only found the wiki page http://wiki.lazarus.freepascal.org/Generics which does not even mention the current syntax. Mattias ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.free

[fpc-devel] Generics and compiler conditions

2007-04-03 Thread ik
Hello, I wish to know if there is a predefine macro or compiler directive that can tell me if there is a support for generics with something such as: {$IFDEF USEGENERICS} ... {$ELSE} ... {$ENDIF} Or {$IF USEGENERICS} ... {$ELSE} .. {$ENDIF} Thanks, Ido -- http://ik.homelinux.org/ __

[fpc-devel] Generics

2007-02-03 Thread ik
Hi All, I'm looking for a guide (for people that have slow learning curves like me ;)) regarding understanding generics, and the ability to start using them. Thanks, Ido -- http://ik.homelinux.org/ ___ fpc-devel maillist - fpc-devel@lists.freepasca

Re: [fpc-devel] generics

2006-12-21 Thread Michael Schnell
Michael Schnell schreef: No. Generics are more like using a macro when defining a type. So a ":=" copies the memory and not a pointer and they are passed by value into a procedure. I think you cut too much context. To which question does this give an answer? (Don't you see the link to t

Re: [fpc-devel] generics

2006-12-21 Thread Vincent Snijders
Michael Schnell schreef: No. Generics are more like using a macro when defining a type. So a ":=" copies the memory and not a pointer and they are passed by value into a procedure. I think you cut too much context. To which question does this give an answer? Vincent __

Re: [fpc-devel] generics

2006-12-21 Thread Michael Schnell
No. Generics are more like using a macro when defining a type. So a ":=" copies the memory and not a pointer and they are passed by value into a procedure. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-devel] generics

2006-12-20 Thread Daniël Mantione
Op Wed, 20 Dec 2006, schreef Marco van de Voort: > > Op Wed, 20 Dec 2006, schreef Marco van de Voort: > > > > > In other word the type is not parameterized by another type but by an > > > > > integer > > > > > used to define the upper limit of an array. > > > > > > > > Basically, isn't this si

Re: [fpc-devel] generics

2006-12-20 Thread Marco van de Voort
> Op Wed, 20 Dec 2006, schreef Marco van de Voort: > > > > In other word the type is not parameterized by another type but by an > > > > integer > > > > used to define the upper limit of an array. > > > > > > Basically, isn't this similar to a schema type like you have in Extended > > > Pascal? >

Re: [fpc-devel] generics

2006-12-20 Thread Daniël Mantione
Op Wed, 20 Dec 2006, schreef Marco van de Voort: > > Op Wed, 20 Dec 2006, schreef Vincent Snijders: > > > > > > > > In other word the type is not parameterized by another type but by an > > > integer > > > used to define the upper limit of an array. > > > > Basically, isn't this similar to a

Re: [fpc-devel] generics

2006-12-20 Thread Marco van de Voort
> Op Wed, 20 Dec 2006, schreef Vincent Snijders: > > > > > In other word the type is not parameterized by another type but by an > > integer > > used to define the upper limit of an array. > > Basically, isn't this similar to a schema type like you have in Extended > Pascal? Aren't those autom

Re: [fpc-devel] generics

2006-12-20 Thread Daniël Mantione
Op Wed, 20 Dec 2006, schreef Vincent Snijders: > Daniël Mantione schreef: > > > > Op Wed, 20 Dec 2006, schreef Vincent Snijders: > > > > > Will fpc support generic record declarations like this: > > > > > > type > > > generic TFixedKeyNode = record > > > key: array[0..KeySize-1] of char; > >

Re: [fpc-devel] generics

2006-12-20 Thread Michael Schnell
Will fpc support generic record declarations like this: type generic TFixedKeyNode = record key: array[0..KeySize-1] of char; value: dword; end; In other word the type is not parameterized by another type but by an integer used to define the upper limit of an array. Free Pascal

Re: [fpc-devel] generics

2006-12-20 Thread Vincent Snijders
Daniël Mantione schreef: Op Wed, 20 Dec 2006, schreef Vincent Snijders: Will fpc support generic record declarations like this: type generic TFixedKeyNode = record key: array[0..KeySize-1] of char; value: dword; end; In other word the type is not parameterized by another type but by an int

Re: [fpc-devel] generics

2006-12-20 Thread Daniël Mantione
Op Wed, 20 Dec 2006, schreef Vincent Snijders: > Will fpc support generic record declarations like this: > > type > generic TFixedKeyNode = record > key: array[0..KeySize-1] of char; > value: dword; > end; > > In other word the type is not parameterized by another type but by an integer > us

[fpc-devel] generics

2006-12-20 Thread Vincent Snijders
Will fpc support generic record declarations like this: type generic TFixedKeyNode = record key: array[0..KeySize-1] of char; value: dword; end; In other word the type is not parameterized by another type but by an integer used to define the upper limit of an array. I am thinking

Re: [fpc-devel] Generics

2006-04-13 Thread Vincent Snijders
Marc Weustink wrote: Flávio Etrusco wrote: On 4/12/06, Bisma Jayadi <[EMAIL PROTECTED]> wrote: It isn't clear to me what the current status about Generics is: http://www.freepascal.org/wiki/index.php/Generics http://www.dummzeuch.de/delphi/object_pascal_templates/english.html http://commu

Re: [fpc-devel] Generics

2006-04-13 Thread Daniël Mantione
Op Thu, 13 Apr 2006, schreef Marc Weustink: > > Ingenious! I really feel stupid for not thinking of something that > > simple like this before :-) > > Is it possible this way to "derive" 2 (or more) classes in one unit from the > same generic ? The matrix unit does it. It uses FPC's preprocess

Re: [fpc-devel] Generics

2006-04-13 Thread Marc Weustink
Flávio Etrusco wrote: On 4/12/06, Bisma Jayadi <[EMAIL PROTECTED]> wrote: It isn't clear to me what the current status about Generics is: http://www.freepascal.org/wiki/index.php/Generics http://www.dummzeuch.de/delphi/object_pascal_templates/english.html http://community.borland.com/article

Re: [fpc-devel] Generics

2006-04-13 Thread Jonas Maebe
On 13 apr 2006, at 00:29, Flávio Etrusco wrote: http://www.dummzeuch.de/delphi/object_pascal_templates/english.html http://community.borland.com/article/0,1410,27603,00.html Ingenious! I really feel stupid for not thinking of something that simple like this before :-) Something similar is

Re: [fpc-devel] Generics

2006-04-12 Thread Bisma Jayadi
It isn't clear to me what the current status about Generics is: http://www.freepascal.org/wiki/index.php/Generics http://www.dummzeuch.de/delphi/object_pascal_templates/english.html http://community.borland.com/article/0,1410,27603,00.html Ingenious! I really feel stupid for not thinking of s

Re: [fpc-devel] Generics

2006-04-12 Thread Flávio Etrusco
On 4/12/06, Bisma Jayadi <[EMAIL PROTECTED]> wrote: > > It isn't clear to me what the current status about Generics is: > > http://www.freepascal.org/wiki/index.php/Generics > > http://www.dummzeuch.de/delphi/object_pascal_templates/english.html > > http://community.borland.com/article/0,1410,27603

Re: [fpc-devel] Generics

2006-04-12 Thread Micha Nelissen
On Wed, 12 Apr 2006 08:31:58 +0200 (CEST) "Peter Vreman" <[EMAIL PROTECTED]> wrote: > FPC is a compiled language where not all types are classes. The only way > to implement it is like C++ templates. It is a known fact that generics > will introduce code bloat, but that is still less than the 15-2

Re: [fpc-devel] Generics

2006-04-12 Thread Bisma Jayadi
It isn't clear to me what the current status about Generics is: http://www.freepascal.org/wiki/index.php/Generics http://www.dummzeuch.de/delphi/object_pascal_templates/english.html http://community.borland.com/article/0,1410,27603,00.html -Bee- has Bee.ography at http://beeography.wordpress.

Re: [fpc-devel] Generics

2006-04-12 Thread Danny Milosavljevic
Hi, Am Dienstag, den 11.04.2006, 18:56 -0300 schrieb Flávio Etrusco: > On 4/11/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Am Montag, den 10.04.2006, 23:33 -0300 schrieb Flávio Etrusco: > > > On 4/10/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > >

  1   2   >