title image


Smiley Re: Was genau bedeutet NIL und gibt es sowas wie EOF() für Arrays
von "http://delphi.about.com/od/beginners/l/aa011601a.htm"



NILing pointers

Unassigned pointers are dangerous.

Since pointers let us work directly with computer's memory, if we try to (by mistake)

write to a protected location in memory we could get a access violation error.

This is the reason why we should always initialize a pointer to a special value of NIL.

The reserved word nil is a special constant that can be assigned to any pointer.

When nil is assigned to a pointer, the pointer doesn’t reference anything.

Delphi presents, for example, an empty dynamic array or a long string as a nil pointer.
TDelphiAnfaenger


geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: