Alex Papadimoulis

Founder, The Daily WTF

Sep 2017

Classic WTF: #include "pascal.h"

by in Feature Articles on
It's Labor Day in the US, where to honor workers, some people get a day off, but retail stores are open with loads of sales. We're reaching back to the old days of 2004 for this one. -- Remy

Ludwig Von Anon sent in some code from the UI component of a large, multi-platform system he has the pleasure of working on. At first glance, the code didn't seem all too bad ...

procedure SelectFontIntoDC(Integer a) begin
 declare fonthandle fh;
 if (gRedraw is not false) then begin
   fh = CreateFontIndirect(gDC);
   SelectObject(gDC, fh);