[fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Mark Morgan Lloyd
I was having a bit of fun earlier while waiting for a call. Am I correct in believing that something like typet1= array of integer; var a1: t1; x: integer; a1 := [1,2,3,4,5]; can't be done at present, irrespective of any custom definition of the := operator? Is there an

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Jonas Maebe
On 15 Apr 2013, at 16:48, Mark Morgan Lloyd wrote: I was having a bit of fun earlier while waiting for a call. Am I correct in believing that something like typet1= array of integer; var a1: t1; x: integer; a1 := [1,2,3,4,5]; can't be done at present, irrespective

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: with an appropriate definition of the + operator without risk that an error would try to evaluate it as an ordinary arithmetic expression? We don't have constant to identify a qNaN. From math: NaN = 0.0/0.0; Infinity = 1.0/0.0;

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 15 Apr 2013, at 16:48, Mark Morgan Lloyd wrote: I was having a bit of fun earlier while waiting for a call. Am I correct in believing that something like typet1= array of integer; var a1: t1; x: integer; a1 := [1,2,3,4,5]; can't be done at present,

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Jonas Maebe said: with an appropriate definition of the + operator without risk that an error would try to evaluate it as an ordinary arithmetic expression? We don't have constant to identify a qNaN. From math: NaN = 0.0/0.0;

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Sven Barth
On 15.04.2013 20:17, Mark Morgan Lloyd wrote: Jonas Maebe wrote: On 15 Apr 2013, at 16:48, Mark Morgan Lloyd wrote: I was having a bit of fun earlier while waiting for a call. Am I correct in believing that something like typet1= array of integer; var a1: t1; x: integer; a1 :=

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Mark Morgan Lloyd
Sven Barth wrote: That's a good point, although obviously ordering would be lost. After I'd tinkered with it for a while I concluded that it was probably related to the discussion of tuples a few weeks ago. Not really. Also the principial components are already available in the compiler so

Re: [fpc-pascal] Array assignment, and not-a-number

2013-04-15 Thread Sven Barth
Am 15.04.2013 22:32 schrieb Mark Morgan Lloyd markmll.fpc-pas...@telemetry.co.uk: Sven Barth wrote: That's a good point, although obviously ordering would be lost. After I'd tinkered with it for a while I concluded that it was probably related to the discussion of tuples a few weeks ago.