I have an error in my code. There is no doubt about it; this is my fault and my fault is completely:
procedure TfrmCageSetup.actDeleteFloatExecute(Sender: TObject);
var
conn: TADOConnection;
begin
...
if not float.CanDelete(conn, {out}noDeleteReason) then
begin
...
end;
I forgot to initialize the variable conn. As a result, this is old rubbish. And when the target control group checks the argument, it passes:
function TFloat.CanDelete(Connection: TADOConnection; out NoDeleteReason: string): Boolean;
begin
if Connection = nil then
raise EArgumentNullException.Create('Connection');
And sometimes I had a very strange violation of access rights.
But why didn't Delphi catch him?
Yes, it's my fault. But part of the reason I use a statically, strongly, typed language is that it can help me catch these stupid mistakes.
, - (, - ). , :

, , , :
,
, ( , ):

, ( ), . ; VCL JVCL, Delphi :

, Delphi
?
, , , , , .
, 64- . , 64- ( ) , 32- . , 32-?
:

32- 64- .
1/25/2015 - ?
:
procedure TForm1.FormCreate(Sender: TObject);
var
silverWarrior: Integer;
begin
IsWrong(silverWarrior);
end;
function TForm1.IsWrong(n: Integer): Boolean;
begin
Result := True;
end;
:
W1036 "silverWarrior"

; ( ):
procedure TForm1.FormCreate(Sender: TObject);
var
silverWarrior: Integer;
theAnswer: Integer;
begin
theAnswer := silverWarrior + 42;
end;
:
W1036 "silverWarrior"
32 ?
; :
procedure TForm1.FormCreate(Sender: TObject);
var
localVariable1: Integer;
localVariable2: Integer;
localVariable3: Integer;
localVariable4: Integer;
localVariable5: Integer;
localVariable6: Integer;
localVariable7: Integer;
localVariable8: Integer;
localVariable9: Integer;
localVariable10: Integer;
localVariable11: Integer;
localVariable12: Integer;
localVariable13: Integer;
localVariable14: Integer;
localVariable15: Integer;
localVariable16: Integer;
localVariable17: Integer;
localVariable18: Integer;
localVariable19: Integer;
localVariable20: Integer;
localVariable21: Integer;
localVariable22: Integer;
localVariable23: Integer;
localVariable24: Integer;
localVariable25: Integer;
localVariable26: Integer;
localVariable27: Integer;
localVariable28: Integer;
localVariable29: Integer;
localVariable30: Integer;
localVariable31: Integer;
localVariable32: Integer;
localVariable33: Integer;
localVariable34: Integer;
localVariable35: Integer;
localVariable36: Integer;
localVariable37: Integer;
localVariable38: Integer;
localVariable39: Integer;
localVariable40: Integer;
localVariable41: Integer;
localVariable42: Integer;
localVariable43: Integer;
localVariable44: Integer;
localVariable45: Integer;
localVariable46: Integer;
localVariable47: Integer;
localVariable48: Integer;
localVariable49: Integer;
silverWarrior: Integer;
theAnswer: Integer;
begin
theAnswer := silverWarrior + 42;
end;
W1036 "silverWarrior"