- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
On the Iraqi side or the Iranian one?
Admin
This comment really was my daily wtf
Admin
The only thing that makes sense to me is that it's more of an assembler-ism (which, given that we're agreed it can't have been TP4 as presented, doesn't particularly worry me): it's come from a calculation that's supposed to be unsigned but has overflowed into the sign bit, so we shift right (which is the same as dividing by two, right? At least if you're not in the mood for details) to bring it back into valid range. Admittedly, why you would do that instead of clamping to max eludes me, but it makes more sense than "if it's negative, divide by two".
Admin
He is absolutely correct in what he says although perhaps he could have qualified it by saying "He obviously doen'st know much about Pascal (Turbo or otherwise) and missile control systems."
Admin
Whatever programming language that was, it seems quite unlikely to have been any flavor of PASCAL - quite aside from the stupidity of picking PASCAL for embedded control programming, the code resembles PASCAL no more than C. So whatever '/' meant in PASCAL is irrelevant.
Being a DOD project, I'd expect it was either ADA - but I think ADA can't have unclosed comments - or, some language developed specifically for the military. IIRC, they started doing that with the Atlas ICBM's in the 1950's (although I expect that language would have been limited to the common punch card character set, no {} brackets and no lower case letters), and a job interview in 1987 turned out to be for programming in some such internal language. I never did, so I can't tell you anything about those internal languages except that they existed and were used long after better choices were available.
Admin
Indeed, as they would only travel 5m anyway.
Admin
I've had to mangle code that starts with #define BEGIN { #define END }
It wouldn't surprise me if somebody somewhere had managed to force a compiler to accept #define \n{ \nBEGIN #define \n} \nEND
Admin
Green CRT's. I know, I coded that crap.
Admin
I am AMAZING!