AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

FPC Kompatibilitätsfrage

Ein Thema von TurboMagic · begonnen am 27. Nov 2021 · letzter Beitrag vom 27. Nov 2021
 
mjustin

Registriert seit: 14. Apr 2008
3.013 Beiträge
 
Delphi 2009 Professional
 
#2

AW: FPC Kompatibilitätsfrage

  Alt 27. Nov 2021, 11:43
Zu class helper Einschränkungen siehe https://www.freepascal.org/docs-html/ref/refse65.html:

Zitat:
Destructors or class destructors are not allowed.
Class constructors are not allowed.
Class helpers cannot descend from record helpers, and cannot extend record types.
Field definitions are not allowed. Neither are class fields.
Properties that refer to a field are not allowed. This is in fact a consequence of the previous item.
Abstract methods are not allowed.
Virtual methods of the class cannot be overridden. They can be hidden by giving them the same name or they can be overloaded using the overload directive.
Unlike for regular procedures or methods, the overload specifier must be explicitly used when overloading methods from a class in a class helper. If overload is not used, the extended type’s method is hidden by the helper method (as for regular classes).
TObject enthält eine ToString methode. ToInteger ist nur twas für bestimmte (numerische) Typen sinnvoll, welche konkreten Fälle sind denn gesucht?

Array Operatoren werden hier beschrieben: https://www.freepascal.org/docs-html/ref/refsu48.html

Beispiel:
Delphi-Quellcode:
var
  a,b, c : array of byte;

begin
  a:=[0,1,2];
  b:=[3,4,5];
  c:=a+b;
  writeln('C has ',length(c),' elements');
Ausgabe:

Zitat:
C has 6 elements
Michael Justin

Geändert von mjustin (27. Nov 2021 um 11:44 Uhr) Grund: Ausgabe hinzugefügt
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:05 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-2025 by Thomas Breitkreuz