AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Delphi Variable Initialization

Ein Thema von Edelfix · begonnen am 11. Aug 2017 · letzter Beitrag vom 11. Aug 2017
 
Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.961 Beiträge
 
Delphi 12 Athens
 
#4

AW: Delphi Variable Initialization

  Alt 11. Aug 2017, 11:38
Laut Google sind in Delphi globale Variablen immer auf 0/nil initialisiert, lokale aber unintialisiert, also undefined. Darauf verlassen würde ich mich aber nicht.
Da kann man sich schon drauf verlassen, das ist auch dokumentiert, einfach mal in die Doku schauen:
http://docwiki.embarcadero.com/RADSt...o/en/Variables
Zitat:
If you do not explicitly initialize a global variable, the compiler initializes it to 0. Object instance data (fields) are also initialized to 0. On the Wiin32 platform, the contents of a local variable are undefined until a value is assigned to them.
Sebastian Jänicke
AppCentral
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

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 00:15 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