News for hackers. Stuff that matters.
Re:The original source code of Microsoft GW-BASIC from 1983 by int_19h on Saturday May 23, 2020 @06:56PM (#23287339)
Short circuiting means not evaluating the right side if the left side is sufficient - so e.g. in (Foo() OR Bar()), if Foo() returns true, it won't even evaluate Bar().

Most modern languages are like that, but BASIC is an exception to this day - even VB.NET still doesn't do short circuiting by default. You need to use special operators, AndAlso/OrElse, to get it.

Computing the line number in a GOTO is definitely an extension - the original Dartmouth BASIC never had anything like that. For jump tables and such, you were supposed to use ON..GOTO.

Re:The original source code of Microsoft GW-BASIC from 1983 by ddingus on Sunday May 24, 2020 @05:40PM (#23295069)
Makes perfect sense. Maybe nobody cares enough about Basic, or figures there are a zillion better performing options? Seems like an optimization like that would have been done at some point

Yeah, the computed goto is odd.

Back in the day, I used it and some conditional math to greatly shorten and improve performance in some programs. My first machine was only 16k. Using the graphics system in any meaningful way cost a lot in terms of program space. So, every dirty trick, including poking new addresses into string variable address pointers to overlap the graphics screen got done.

Absolutely terrible code though. I am sure if I saw some of that code today, I would have a bugger of a time sorting it out.