Sign in Join

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

Mailing lists / lazarus / 1999-08

Pascal Question....

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Curtis White
to Shane Miller: Can someone look at delphi's Graphics.pas file and go to the definition for TFontStyle. …
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 15 lines
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.

Show quoted text 6 lines
but I keep getting... Error: Opeerator is not overloaded. Thoughts?

Some :)

Curtis

Reply by email

Shane Miller
That was an error in the message I sent you.  It is actually
FontStyle : TFontStyles;

I sent another email in this regards with the actual code pasted into the email. Shane

>> "Shane Miller" 08/11 12:44 PM >>>

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];

but I keep getting...
Error: Opeerator is not overloaded.

Thoughts?
Shane

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Shane Miller

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];

but I keep getting...
Error: Opeerator is not overloaded.

Thoughts?
Shane

Reply by email

Jeff Wormsley
to Shane Miller
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.

Isn't this something to do with using the Delphi VCL in BCB? So that there won't be two copies in BCB code? Just off of the top of my head, I may be completely wrong...

Jeff.

Reply by email