Re: [fpc-pascal] Compiling 3.1.1 trunk

2018-06-23 Thread Jim Lee
On 06/23/2018 02:18 PM, Sven Barth via fpc-pascal wrote: Jim Lee mailto:jle...@gmail.com>> schrieb am Sa., 23. Juni 2018, 17:34: Hi, newbie to fpc (but not Pascal) here. I'm trying to compile the fpc trunk from svn on linux.  I managed to find the buildfaq, but I'm running into pr

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
R0b0t1 schrieb am Sa., 23. Juni 2018, 18:50: > On Saturday, June 23, 2018, Ryan Joseph > wrote: > > > > > >> On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> See also here: https://www.freepascal.org/docs-html/ref/refse26.html > > > > I

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am Sa., 23. Juni 2018, 22:56: > Much thanks Sven! I'm note sure when I'll use it, but the option is always > nice to have. A small question, since it's available in a class, does > "class threadvar" support generics? > > {$mode delphi} > > type > TAnimal = class > publi

Re: [fpc-pascal] Compiling 3.1.1 trunk

2018-06-23 Thread Sven Barth via fpc-pascal
Jim Lee schrieb am Sa., 23. Juni 2018, 17:34: > Hi, newbie to fpc (but not Pascal) here. > > I'm trying to compile the fpc trunk from svn on linux. I managed to > find the buildfaq, but I'm running into problems. > > I've done this: > > $ svn checkout http://svn.freepascal.org/svn/fpcbuild fpcbu

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Anthony Walter
Much thanks Sven! I'm note sure when I'll use it, but the option is always nice to have. A small question, since it's available in a class, does "class threadvar" support generics? {$mode delphi} type TAnimal = class public class threadvar Trainer: T; end; For everyone else, threadvar is t

Re: [fpc-pascal] Compiling 3.1.1 trunk

2018-06-23 Thread Jim Lee
On 06/23/2018 08:46 AM, Jonas Maebe wrote: On 23/06/18 06:24, Jim Lee wrote: I'm trying to compile the fpc trunk from svn on linux.  I managed to find the buildfaq, but I'm running into problems. I've done this: $ svn checkout http://svn.freepascal.org/svn/fpcbuild fpcbuild $ cd fpcbuild/t

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread R0b0t1
On Saturday, June 23, 2018, Ryan Joseph wrote: > > >> On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: >> >> See also here: https://www.freepascal.org/docs-html/ref/refse26.html > > I had no idea this existed. When was it added? > > Regards, >

Re: [fpc-pascal] Compiling 3.1.1 trunk

2018-06-23 Thread Jonas Maebe
On 23/06/18 06:24, Jim Lee wrote: I'm trying to compile the fpc trunk from svn on linux.  I managed to find the buildfaq, but I'm running into problems. I've done this: $ svn checkout http://svn.freepascal.org/svn/fpcbuild fpcbuild $ cd fpcbuild/trunk/fpcsrc/compiler $ make cycle  # (no erro

[fpc-pascal] Compiling 3.1.1 trunk

2018-06-23 Thread Jim Lee
Hi, newbie to fpc (but not Pascal) here. I'm trying to compile the fpc trunk from svn on linux.  I managed to find the buildfaq, but I'm running into problems. I've done this: $ svn checkout http://svn.freepascal.org/svn/fpcbuild fpcbuild $ cd fpcbuild/trunk/fpcsrc/compiler $ make cycle  #

Re: [fpc-pascal] Default record fields

2018-06-23 Thread Jim Lee
On 06/22/2018 04:19 AM, Karoly Balogh (Charlie/SGR) wrote: It's not about the compiler team. It's about the integrity of a programming language, which doesn't matter these days a lot, when all languages turned into a feature race to provide the same broken concepts, but with slightly different

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2018 um 16:51 schrieb Ryan Joseph: On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal wrote: See also here: https://www.freepascal.org/docs-html/ref/refse26.html I had no idea this existed. When was it added? Probably around 2.0 when Delphi support was added... 🤷‍♀️ So quite a

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Ryan Joseph
> On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal > wrote: > > See also here: https://www.freepascal.org/docs-html/ref/refse26.html I had no idea this existed. When was it added? Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Sa., 23. Juni 2018, 16:04: > > > > On Jun 23, 2018, at 8:55 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > A threadvar section is started using "class threadvar" and the "class" > specifier is required. They are accessed like ordinary clas

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > > > A threadvar section is started using "class threadvar" and the "class" > > specifier is required. They are accessed like ordinary class variables with > > the difference that they'll hold different values per thread - the same as > > global thr

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Ryan Joseph
> On Jun 23, 2018, at 8:55 PM, Sven Barth via fpc-pascal > wrote: > > A threadvar section is started using "class threadvar" and the "class" > specifier is required. They are accessed like ordinary class variables with > the difference that they'll hold different values per thread - the same

[fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
Hello together! Announcing a small feature this time, but some might appreciate it: FPC now supports the declaration of threadvars inside class and record types. === code begin === {$mode objfpc} {$modeswitch advancedrecords} type   TTestClass = class   public class threadvar     Test: LongI

Re: [fpc-pascal] Default record fields

2018-06-23 Thread Ryan Joseph
> On Jun 23, 2018, at 3:09 PM, leledumbo via fpc-pascal > wrote: > > Those are two different things actually: Declaration time initialization for > variables vs default record field values. The former doesn't cause confusion > because the value and the variable are in the same place, but the l

Re: [fpc-pascal] Default record fields

2018-06-23 Thread leledumbo via fpc-pascal
> My thinking was that because variables can assign values at declaration it would be reasonable to assume that record fields could have default values which would be assigned at declaration. It sounds like a natural extension of the syntax that already exists. Those are two different things actu

Re: [fpc-pascal] Proper preprocessor?

2018-06-23 Thread Florian Klämpfl
Am 23.06.2018 um 04:30 schrieb Ryan Joseph: On Jun 23, 2018, at 3:13 AM, Florian Klämpfl wrote: {$macro on} {$define TypeStr:=specialize _TypeStr} begin Writeln(TypeStr); end. ;) You have a good sense of humor about it at least. :) So you can in fact print types, albeit with a more