Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-07

Sets not implemented??

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dominique Louis

Hi, I just tried to do the following...

uses
   Graphics;
var
   fs : TFontStyles;
begin
   fs := fs or fsBold;
   fs := fs or fsItalic;
end;

at compilation time I get the error...
"Operation not implemented for sets"

Will "or" or "+" ever be implemented for sets?
Is there another way to easily work with sets?

Thanks,

Dominique;

Reply by email

Mattias Gaertner
to Dominique Louis
Show quoted text 17 lines
Hi, I just tried to do the following... uses Graphics; var fs : TFontStyles; begin fs := fs or fsBold; fs := fs or fsItalic; end; at compilation time I get the error... "Operation not implemented for sets" Will "or" or "+" ever be implemented for sets? Is there another way to easily work with sets?
fs:=fs+[fsBold];
or
Include(fs,fsBold);

Mattias

Reply by email

Maxim Ganetsky
to Dominique Louis: Hi, I just tried to do the following... uses Graphics; var fs : TFontStyles; begin fs :=…

Dominique Louis ?????:

Show quoted text 17 lines
Hi, I just tried to do the following... uses Graphics; var fs : TFontStyles; begin fs := fs or fsBold; fs := fs or fsItalic; end; at compilation time I get the error... "Operation not implemented for sets" Will "or" or "+" ever be implemented for sets? Is there another way to easily work with sets?

Yes:

fs := fs + [fsBold];

Sometimes it is very useful to read reference manual ;)

Reply by email