[lazarus] Pascal Question....

Curtis White osiriz at teleport.com
Wed Aug 11 14:23:20 EDT 1999


Well, I see why you are getting the error. But I don't know what the
{$NODEFINE...} is for.

On 11-Aug-99 Shane Miller wrote:
> Can someone look at delphi's Graphics.pas file and go to the definition for
> TFontStyle.  Please explain to me what the NODEFINE is doing there.
> 
> TFontStyle = (fsBold, fsItalic, fsUnderline, fsStrikeOut);
> {$NODEFINE TFONTSTYLE}
> TFOntStyles = set of TFontStyle;
> ...
> ...
> I'm trying to do this in code...
> 
> FontStyle : TFOnt Style;
> ...
> ..
> FontStyle := [fsBold];
> if something then FontStyle := FontStyle + [fsItalic];

FontStyle is just a single TFontStyle. You are trying to add an additional font
style to it. But since it is not a set, you can't do that. If you want to add
more font styles to it, then your FontStyle variable needs to be defined as the
set as follows:

FontStyle: TFontStyles;
                              ^

This will allow you to add more font styles to the set.


> 
> but I keep getting...
> Error: Opeerator is not overloaded.
> 
> 
> Thoughts?

Some :)


Curtis






More information about the Lazarus mailing list