2
votes
Vote UpVote

Things that make you go ‘urgh’…

Delphi Haven – What’s the flaw in this test code? program Project1; {$APPTYPE CONSOLE} var Arr1, Arr2: array of array of Integer; I, J: Integer; begin SetLength(Arr1, 5, 5); for I := 0 to 4 do for J := 0 to 4 do Arr1[I, J] := I * J; Arr2 := Copy(Arr1); for I := 0 to 4 do for J := 0 to 4 do if Arr2[I, J] <> Arr1[I, J] then begin WriteLn('Nope'); Break; end; Write('Press ENTER to exit...'); ReadLn; end. I’ve just checked, and FPC lovingly duplicates the behaviour I’m thinking of too. The flaw in question was immediately ...
Favorite? Off-Topic? Chris Rolliston @ 2011-07-17 11:12

Statistics

Visits: 917
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

François
rvelthuis
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)