Andrew had to touch some Pascal code. Yes, really. He writes: "I came across this section of code today and really wanted to find out who wrote it. Then I really wanted to find out who added the comment."

.comment {border: none}

{ Ugly code follows, a loop would be nice } { Seller #1 } if not EOF then begin lsSName := FieldByName('txtname').AsString; if Length(FieldByName('txtsname').AsString) > 0 then begin lsSName := Concat(lsSName,', ' + FieldByName('txtsname').AsString); end; Next; sctevarS1Name.AsString := lsSName; end else begin Close; Exit; end; { else } { Seller #2 } if not EOF then begin lsSName := FieldByName('txtname').AsString; if Length(FieldByName('txtsname').AsString) > 0 then begin lsSName := Concat(lsSName,', ' + FieldByName('txtsname').AsString); end; Next; sctevarS2Name.AsString := lsSName; end else begin Close; Exit; end; { else } { Seller #3 } if not EOF then begin lsSName := FieldByName('txtname').AsString; if Length(FieldByName('txtsname').AsString) > 0 then begin lsSName := Concat(lsSName,', ' + FieldByName('txtsname').AsString); end; Next; sctevarS3Name.AsString := lsSName; end else begin Close; Exit; end; { else } { Seller #4 } if not EOF then begin lsSName := FieldByName('txtname').AsString; if Length(FieldByName('txtsname').AsString) > 0 then begin lsSName := Concat(lsSName,', ' + FieldByName('txtsname').AsString); end; Next; sctevarS4Name.AsString := lsSName; end else begin Close; Exit; end; { else }

Yes, a loop would have been nice. Pity we couldn't do that, for some reason.

hljs.initHighlightingOnLoad();

[Advertisement] Otter – Provision your servers automatically without ever needing to log-in to a command prompt. Get started today!

Remy Porter

Source link

You May Also Like

Let’s discuss the ‘perfect boob ratio’ for – you know… science reasons 

It seems as though we can put this subject to rest as…

How To Eat Healthy In Just 3 Bites

Eating right is a great way to boost your immune system as…

The Evolution of Mickey Rourke

Tags: wtf 4680 points, 429 comments. Source link

Michelangelo: David’s Penis is Small – Marilyn Sands, Humor Times

Michelangelo: “I say, if it was any bigger – THAT would be…