Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi TPoint im const Abschnitt (https://www.delphipraxis.net/30466-tpoint-im-const-abschnitt.html)

Jens Schumann 25. Sep 2004 10:00


TPoint im const Abschnitt
 
Hallo,
ich habe ein Problem mit TPoint im const Abschnitt.
D. h. ich möchte einen Konstante als TPoint in den const Abschnitt schreiben.

Delphi-Quellcode:
const
  EinIntegerArray : Array[0..1] of Integer = (1,2); // ist ja kein Problem
 
  EinTPoint : TPoint = Point(-1,-1); // geht nicht
Warum funktioniert das nicht?

Keldorn 25. Sep 2004 10:28

Re: TPoint im const Abschnitt
 
Hallo

schon mal in die Hilfe geschaut ;)?

Zitat:

Zitat von Hilfe zu Record-Konstanten
const
Origin: TPoint = (X: 0.0; Y: 0.0);
//anmerk: tpoint x und y sind dort aber als single definiert.

ansonsten glaube ich nicht, das bei const funktionen (wie Point) zulässig sind

Mfg Frank

Jens Schumann 25. Sep 2004 10:31

Re: TPoint im const Abschnitt
 
Moin Keldorn,
super - funktioniert - Danke


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:18 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz