Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Vinzent Hoefler
On Thursday 15 February 2007 14:46, Daniël Mantione wrote: > Op Thu, 15 Feb 2007, schreef Vinzent Hoefler: > Because, in a case statement you are already "inside" the brackets: Yeah, I sort of figured that. ;) > > Another oddity would be a for loop: > > > >for Bla := One to Five do ... > > >

Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Daniël Mantione
Op Thu, 15 Feb 2007, schreef Vinzent Hoefler: > So if the case label is considered a set why can't I use a set constant > (see the commented lines above) Because a normal set is limited by brackets: const a = [1,2,5]; b = [a,7,8,9]; {This is not allowed.} b = [a]+[7,8,9]; {But t

Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Florian Klaempfl
Daniël Mantione schrieb: >> Another minor issue is that a type declaration like: >> >>type >> My_Range = (2500 - 500) .. (2500 + 500); >> >> is not accepted (message similar to ";" expected, ".." found) and >> (basically the same declaration) >> >>type >> My_Range = 2500 - 500

Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Vinzent Hoefler
On Thursday 15 February 2007 13:36, Daniël Mantione wrote: > Op Thu, 15 Feb 2007, schreef Vinzent Hoefler: > > Well, fair enough, but why is that I can declare a > > > >type > > Foo = array[byte] of Something; > > > > where the type name "byte" also indicates the range? Considering > > th

Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Daniël Mantione
Op Thu, 15 Feb 2007, schreef Vinzent Hoefler: > Well, fair enough, but why is that I can declare a > >type > Foo = array[byte] of Something; > > where the type name "byte" also indicates the range? Considering that > >type > Foo = array[Low (byte) .. High (byte) of Somethi

Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Vinzent Hoefler
On Thursday 15 February 2007 13:06, Daniël Mantione wrote: > Op Thu, 15 Feb 2007, schreef Vinzent Hoefler: > > program > >Case_Test; > > > > type > >My_Range = 2000 .. 3000; > > > > var > >X : Integer; > > > > begin > >X := 2500; > > > >case X of > > Low (My_Range) .. High

Re: [fpc-devel] "case" with range stupidities

2007-02-15 Thread Daniël Mantione
Op Thu, 15 Feb 2007, schreef Vinzent Hoefler: > program >Case_Test; > > type >My_Range = 2000 .. 3000; > > var >X : Integer; > > begin >X := 2500; > >case X of > Low (My_Range) .. High (My_Range) : WriteLn ('In range. (1)'); > My_Range