[fpc-pascal] An idea for a "pair" type

2020-12-16 Thread Ryan Joseph via fpc-pascal
Just for fun I wanted to see what people thought about a potential "pair" type added to the compiler. Dictionaries have proven themselves to be a fundamental type we use often and they are appearing as built-in syntax in many languages, especially scripting languages that allow dynamic object

Re: [fpc-pascal] An idea for a "pair" type

2020-12-16 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 16. Dez. 2020, 18:38: > Just for fun I wanted to see what people thought about a potential "pair" > type added to the compiler. Dictionaries have proven themselves to be a > fundamental type we use often and they are appearing as built-in syntax in >

Re: [fpc-pascal] An idea for a "pair" type

2020-12-16 Thread Ryan Joseph via fpc-pascal
> On Dec 16, 2020, at 10:50 AM, Sven Barth wrote: > > This can simply be done using existing language constructs, no need to > introduce anything new. > That's what I thought you'd say. ;) It's basically syntactic sugar surrounding a generic record, so yes technically it is. It's just

Re: [fpc-pascal] An idea for a "pair" type

2020-12-16 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 16. Dez. 2020, 19:41: > > > > On Dec 16, 2020, at 10:50 AM, Sven Barth > wrote: > > > > This can simply be done using existing language constructs, no need to > introduce anything new. > > > > That's what I thought you'd say. ;) It's basically

[fpc-pascal] Initialization of constant pointer type - bug? [was: Re: Initialization of constant record member of pointer type]

2020-12-16 Thread LacaK via fpc-pascal
Hello, this compiles under FPC 3.0.4 const   s: AnsiString = 'abc';   p: pointer = @s[1]; but not under FPC 3.2.0 (I checked old Delphi XE and there it does not compile also) Is it regression bug or not? -Laco. Thank you, yes it works. I have used: const    MyConst1: AnsiString =