Sign in Join

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

Mailing lists / lazarus / 1999-08

Pascal error message

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Shane Miller

Here's the actual code I am having trouble with....

procedure THighLightAttributes.SetStyleFromInt(const Value: integer);
begin
  if (Value and $1)  = 0 then  Style:= []
else Style:= [fsBold];
  if (Value and $2)  0 then Style := Style + [fsItalic];
  if Value and $4  0 then Style:= Style+[fsUnderline];
  if Value and $8  0 then Style:= Style+[fsStrikeout];
end;

Style is a TFontStyles (defined in Graphics.pp)
Any reason I am getting
Error: Operator is nopt overloaded
on the line where is adds [fsItalic] to style?

Shane

Reply by email

Peter Vreman
to Shane Miller

Please send me code that i can compile directly to check for the error message.

Peter

Shane Miller wrote 24 lines
Here's the actual code I am having trouble with.... procedure THighLightAttributes.SetStyleFromInt(const Value: integer); begin if (Value and $1) = 0 then Style:= [] else Style:= [fsBold]; if (Value and $2) 0 then Style := Style + [fsItalic]; if Value and $4 0 then Style:= Style+[fsUnderline]; if Value and $8 0 then Style:= Style+[fsStrikeout]; end; Style is a TFontStyles (defined in Graphics.pp) Any reason I am getting Error: Operator is nopt overloaded on the line where is adds [fsItalic] to style? Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email