Nick Hodges Well, I stumped last week on something WTF?

Nick Hodges Well, I stumped last week on something WTF?

function TSomeClass.GetMeTheObject: TObject;
  var obj: TObject;
begin
  obj := TryToGetObj;

  if (obj = nil) then
    result := nil
  else
    result := obj
end;

And it's all over the place...

Comments

  1. Simon Stuart Many years ago, a friend of mine wrote a test program for an 8-channel serial I/O card I designed. The code was in 8080 assembler--I did say many years ago--and all the labels were of the form: SloopXXX, where the XXX was a three digit number. The program worked, but I never tried to unravel it myself. And never hired him to code for me again.

    ReplyDelete
  2. Remember, topic area "Code Rants" for letting it all out ;)

    ReplyDelete

Post a Comment