HOWTO: Use Line Numbers in C#
Posted: 8/25/2008 9:10:51 PM
By: Comfortably Anonymous
Times Read: 2,055
0 Dislikes: 0
Topic: Programming: .NET Framework

Not really sure why'd you'd do such a thing these days, but C# does support GOTO, so this guy used it to do a line-by-line conversion of an ancient Star Trek written in BASIC in 1972.

http://www.codeproject.com/KB/game/startrek_1971_text.aspx

The VERY first time I ever touched a computer, it was to play this game! It was on an ancient teletype (Known to me then as the "Magic Typewriter") tapped into some machine at Purdue University. My 7 year old brain could not grasp the concept of this game, so I never won, although I played MANY times - but it was the coolest thing I'd ever seen.

The guy does both a line-by-line conversion using the most horrible-looking C# code I've ever imagined, as well as (Probably so he doesn't die from ridicule!) doing a proper conversion to C# format.

Nicely done in both cases!

Rating: (You must be logged in to vote)