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 ...
> >
>
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
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
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
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
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
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