Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Back in the day, I was an RPG programmer (on an AS/400), and I had a co-worker who insisted upon using geographical labels for all of his GOTO targets: GOTO BARCELONA, GOTO TOKYO, etc.

Needless to say, maintaining his code took some getting used to.



That sounds kind of funny. Where do you go on error?

One time I had to debug this incredibly obfuscated Word Basic subroutine. It was such a mess of gotos (deliberately so) that the company that wrote it for us thought they had us over a barrel and could charge us like a wounded bull.

That is, until I showed my cow-orkers the superior technology of "paper, scissors and sticky tape".


Where do you go on error

Hell, Arizona or any other village with that name. Real C# code can be like this:

    if(John is evil){ goto Hell};
(http://msdn.microsoft.com/en-us/library/scekt9xw%28v=vs.71%2...)


GOTO HELL showed up with predictable frequency. I don't recall if he used it for errors, though.


Which Hell would that be? The one in California, Michigan, the Cayman Islands or Norway?


ON ERROR GOTO REDMOND


Redmond wasn't even on our mental map in those days; Windows was still at 3.11, and NT hadn't been released. The only thing we used PCs were good for was to hold our 5250-emulation cards...


The thing about languages that require GOTOs is that there is often no inherent meaning in the label, such as in a control structure that we'd take for granted these days, and back in the day you were often limited by token size (in one assembler I used it was 5 characters) so people sometimes used schemes like "A0001", "A0002", etc. or sometimes "DOG", "PIG", "CAT", etc. though the former was preferable as it wasn't distracting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: