4 ms·
COBOL's ALTER statement. As if COBOL weren't WTFy enough, the statement ALTER X TO PROCEED TO Y changes any subsequent GOTO X statement to go to Y instead. Mea
by bitwize 15y ago
COBOL's ALTER statement.
As if COBOL weren't WTFy enough, the statement ALTER X TO PROCEED TO Y changes any subsequent GOTO X statement to go to Y instead. Meaning it's anybody's guess where a given GO TO, considered in isolation, goes to!
- Someone 15y agoI upvoted you because it is the first thing I think of when I think of this question, but in Cobol's defense, self-modifying code (http://en.wikipedia.org/wiki/Self-modifying_code http://en.wikipedia.org/wiki/Self-modifying_code) was fairly normal at the time COBOL was conceived. For a nice example from a later date, look at the GetChar subroutine on Commodore Basic. It loaded a byte from a hard-coded address, and then updated that address (hm, probably in the reverse order, since, IIRC, it shared code with GotChar, which returned the last value GetChar returned)