Maybe types should be forbidden at this place completely.
Look at this:
1.) with subrg type - works ok !!
program testin;
type subrg = 1..10;
var i: integer;
begin
for i in subrg do begin
writeln (i)
end
end.
2.) with subrg type in in-expression - gives syntax error
program tes
On Sat, 20 Jun 2015, Jonas Maebe wrote:
On 20/06/15 12:01, Michael Van Canneyt wrote:
On Sat, 20 Jun 2015, Jonas Maebe wrote:
On 20/06/15 11:41, Michael Van Canneyt wrote:
But it is a bug that the compiler does not give an error for the set
type. Please report it.
Should it work with a
Jonas Maebe wrote:
Again: set *variables* or set *types*?
Indeed. Think of
var i: integer;
for i in integer do
which would be amusing.
Regards,
Adriaan van Os
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http:
On 20/06/15 12:01, Michael Van Canneyt wrote:
>
>
> On Sat, 20 Jun 2015, Jonas Maebe wrote:
>
>> On 20/06/15 11:41, Michael Van Canneyt wrote:
>>> But it is a bug that the compiler does not give an error for the set
>>> type. Please report it.
>>
>> Should it work with any set types at all? (I d
On Sat, 20 Jun 2015, Jonas Maebe wrote:
On 20/06/15 11:41, Michael Van Canneyt wrote:
But it is a bug that the compiler does not give an error for the set
type. Please report it.
Should it work with any set types at all? (I don't mean set variables,
but set types) Or even with any type? It
On 20/06/15 11:41, Michael Van Canneyt wrote:
> But it is a bug that the compiler does not give an error for the set
> type. Please report it.
Should it work with any set types at all? (I don't mean set variables,
but set types) Or even with any type? It seems very much like something
that was acc
On Fri, 19 Jun 2015, Torsten Bonde Christiansen wrote:
Consider the following program:
program Project1;
type
TMyEnum = (
a = 1,
b = 3,
c = 5
);
TMySet = set of TMyEnum;
var
Item: TMyEnum;
begin
for Item in TMySet do
Writeln('Value = ', Integer(Item));
end.
On 19/06/15 08:46, Torsten Bonde Christiansen wrote:
> program Project1;
>
> type
> TMyEnum = (
> a = 1,
> b = 3,
> c = 5
> );
> TMySet = set of TMyEnum;
> var
> Item: TMyEnum;
>
> begin
> for Item in TMySet do
> Writeln('Value = ', Integer(Item));
> end.
My guess is that
Consider the following program:
program Project1;
type
TMyEnum = (
a = 1,
b = 3,
c = 5
);
TMySet = set of TMyEnum;
var
Item: TMyEnum;
begin
for Item in TMySet do
Writeln('Value = ', Integer(Item));
end.
I would expect the output of the program to contain the values 1