Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site vu-vlsi.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!psuvm.bitnet!psuvax1!vu-vlsi!colin From: colin@vu-vlsi.UUCP (Colin Kelley) Newsgroups: net.lang Subject: Yes, BASIC sucks, but... Message-ID: <272@vu-vlsi.UUCP> Date: Fri, 28-Mar-86 15:01:52 EST Article-I.D.: vu-vlsi.272 Posted: Fri Mar 28 15:01:52 1986 Date-Received: Sat, 29-Mar-86 16:29:05 EST References: <443@3comvax.UUCP> <7900003@ztivax.UUCP> <12688@ucbvax.BERKELEY.EDU> Organization: Villanova Univ. EE Dept. Lines: 47 Yes, BASIC does suck, but check out some of the simple BASIC that Peter Norton writes. If you've got to use BASIC, that's the way to do it. Typical program: 100 GOSUB 5000 ' Big comment here saying what 5000 does 200 GOSUB 6000 ' another big comment 300 GOSUB 7000 ' etc... 500 END ... His programs typically do very little in lots of space, but they're not bug-ridden! And it's usually pretty obvious that the programs are inspired by (if not directly converted from) PASCAL... Of course, one of the MANY problems with BASIC is that if this program has to do anything other than a simple demo, it'll do it so slowly that it's useless. But even a seventh grader can show you how to speed it up: - delete all those damn comments, - shorten variable names to 1 or 2 characters, - remove all unnecessary blanks (like for indenting), - change the subroutines to inline (!) code, - get rid of the variable name in all NEXT statements, - and then combine lines together right up to 255-byte-per-line limit! But of course, seventh graders are experienced BASIC programmer already; they know to write their programs like this from the beginning! (And of course, they run a global renumberer every couple minutes!) As you can probably tell, I've been through this stage. Fortunately, though, I followed it through long enough to write long, poorly-written, bug-ridden, useless programs. I found that impossible to avoid. But when I took my first PASCAL course about 5 years ago, I saw the light! I was already an assembly language hacker by then though, so I found it annoying not to be able to get to the low-level stuff when I needed to... then... you guessed it... C! Now I'm a happy programmer. How many other people out there started with BASIC? I'm curious if there are other people who wound up avid BASIC-haters precisely because it was the first language they learned... -Colin Kelley ..{psuvax1,pyrnj}!vu-vlsi!colin BTW: don't interpret my first paragraph as a compliment to Peter Norton. The man obviously has one of the biggest egos around already! (Witness all his products, even back in the early days of PC magazine when he could only afford a small ad, that invariably show his picture, with his sleeves rolled up, ready to take on the world...)