Slashdot Mirror


BASIC Computer Language Turns 40

5 REM nam37 codes
10 PRINT "In 1963 two Dartmouth College math professors had a radical"
20 PRINT "idea - create a computer language muscular enough to harness"
30 PRINT "the power of the period's computers, yet simple enough that even"
40 PRINT "the school's janitors could use it."
50 END

37 of 1,042 comments (clear)

  1. Re:ahem by bee-yotch · · Score: 5, Informative

    they started it in '63, they didn't finish it till '64. rtfa

  2. Re:ahem by jonnosan · · Score: 3, Informative

    RTFA - 1963 is when they had the idea. it took till May 1, 1964 to finish it.

  3. Re:Spinning in his grave by LostCluster · · Score: 2, Informative

    VB is a good tool for prototyping and simple stuff where it excels.

    VB is a power tool... if you use it correctly you can get a simple program done faster than you could in C. If you use it incorrectly, you end up with a memory hog application that could have been written better in C.

  4. Re:WHY! WON'T! IT! DIE! by Theatetus · · Score: 5, Informative
    I've heard it claimed that BASIC was "invented" by Microsoft

    Microsoft certainly doesn't claim that.

    or that they own it

    Nor do they claim that

    or that their first product was a BASIC interpreter

    They do claim that, because it's true.

    What's the connection between MS and BASIC?

    BASIC was always the applications and scripting language at Microsoft. For a long time, DOS and the early Windows shipped with a free basic interpreter (sadly, those days are over).

    Visual Basic remains one of Microsoft's flagship products. It's philosophy is similar to the original BASIC philosophy: you shouldn't have to be a comp sci graduate to write computer programs. Whether VB succeeds in that regard is another question, but it's what they intended.

    BASIC is still Microsoft's language for application automation (think Visual Basic for Applications), Web development (ASP with VBScript), and as a tool control language for gluing together objects written in lower level languages. In a sense, some form of BASIC fills the roles in Windows that Scheme, Perl, and TCL occupy in UNIX.

    --
    All's true that is mistrusted
  5. Re:WHY! WON'T! IT! DIE! by SmackCrackandPot · · Score: 2, Informative

    In the early days of the IBM PC and PC clones (1986), Microsoft supplied MS-BASIC which came free with MS-DOS.

    This was at the same time as Borland came out with Turbo Pascal, so there really wasn't any incentive to learn MS-BASIC. Especially as computers were beginning to be networked to UNIX servers.

  6. Dijkstra said it best ... by zonix · · Score: 4, Informative

    "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration." -- Professor Edsger Dijkstra

    Oh yeah and "Goto considered harmful" too, of course.

    RIP buddy. :-)

    z
    --
    What would an EWOULDBLOCK block, if an EWOULDBLOCK could block would? -- me
  7. Re:A Poem! by MikeXpop · · Score: 1, Informative

    10 PRINT "This is a" (Read: Ten print this is a) 20 PRINT "Haiku program" (Read: Twenty print haiku program) 30 GOTO 10 (Read: Thirty goto ten)

    --
    Etiquette is etiquette. He kills his mother but he can't wear grey trousers.
  8. Re:AAAaaaaghhh by drivers · · Score: 2, Informative

    Damn I hated numbering each line of code!

    And when you had to add something and have uneven spacing of line numbers... Oh it just drives the type A personality in me nuts!


    Ah, but AUTO numbers the lines for you. You get a new number each time you hit enter. AUTO [n] starts at line [n].

    RENUM renumbers all the lines with a consistent spacing, including the GOTOs, GOSUBs, etc.

    I can't believe I still remember that PC-DOS BASICA stuff.

  9. Re:A Poem! by mph · · Score: 4, Informative
    Mod parent down, a Haiku is 575 not 343 (is program 3 or 4? If 4 then 353, either way it's wrong)
    Mod yourself down. You forgot to pronounce the line numbers.
  10. Re:A Poem! by mlyle · · Score: 4, Informative

    10 PRINT "This is a"
    20 PRINT "Haiku program"
    30 GOTO 10

    Ten print this is a (5)
    twen-ty print hai ku pro gram (7)
    thir-ty go to ten (5)

  11. Re:Edsger Dijkstra? Does not like it by DarkAurora · · Score: 2, Informative

    HTML is not a programming language. It's a Markup Language. HTML itself does nothing but display text in a pretty way and provide links.

  12. Re:WHY! WON'T! IT! DIE! by LWATCDR · · Score: 2, Informative

    Way back when a young man nammed Bill Gates wrote a version of basic for the one of if not the first computer that a normal or maybe not so normal person could buy the Altair. That was the start of Microsoft. Microsoft pretty much made a living selling basic to all the major computer makers of the day. Commodore, Kaypro, Osborne, Tandy, and I think Apple. I think atari had it's own version of basic.
    Latter when IBM was going to get into the home computer market with there PC they went to Microsoft to buy basic from them. In fact if you have an old IBM PC and do not have any drives in it and power it up it will run basic from ROM.
    While buying basic IBM got sold MS-DOS and the rest is history.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  13. Re:5 REM Testing.. by funkhauser · · Score: 2, Informative
    SYNTAX ERROR
  14. Re:Best Headline Ever by Pranjal · · Score: 3, Informative

    RTFA. It's a direct rip-off from the article.

  15. Re:Spinning in his grave by Pranjal · · Score: 2, Informative

    Thomas Kurtz is still alive. Unfortunately John Kemeny is not.

  16. Re:Nostolgia by AKAImBatman · · Score: 5, Informative

    You wish is my command. Here's the source code plus there's a PALM version at the bottom of the list. In case you want to type it in yourself, SmallBASIC accepts traditional BASIC syntax. Someone event did a SmallBASIC port of Super Star Trek for you!

  17. Re:WHY! WON'T! IT! DIE! by joeykiller · · Score: 4, Informative
    BASIC was always the applications and scripting language at Microsoft. For a long time, DOS and the early Windows shipped with a free basic interpreter (sadly, those days are over).
    Actually, they're not. Every copy of Windows XP, and probably Windows 2000 and ME and maybe even 98, ships with the Windows Scripting Host. One of the languages supported by WSH is VBScript ("Visual Basic Script").

    VBScript is surprisingly capable. Read more about it here.

  18. Memories of First Programming by 4of12 · · Score: 2, Informative

    ...of typing in BASIC programs on a Teletype with a large roll (yes, just like bathroom towels) of yellow newsprint on a Data General Nova.

    And, to write and read my program - paper tape!

    In those days, having a machine do math for you, math that would otherwise be tedious crunching by hand, gave me a sense of wonder and power.

    --
    "Provided by the management for your protection."
  19. Re:a BASIC error by Nate+Eldredge · · Score: 2, Informative

    There's still hope. Remember RENUM?

  20. Re:WHY! WON'T! IT! DIE! by dasmegabyte · · Score: 2, Informative
    Windows shipped with a free basic interpreter (sadly, those days are over)

    Au contraire. Open Notepad. Type in:
    Dim message
    message = "Hello World!"
    WScript.Echo message
    Save it as Hello.vbs. Then, double click on it. Your program will be loaded and interpreted by the Windows Scripting Host, a batch processing system that's been available for Windows since 1998 and installed by default as of 1999. It allocates a variable called message, assigns the string "Hello World!" to that variable, and then passes the Variable to a static function of the globally available object WScript, which echos the message to the screen.

    This works in ME and 2k, might work in XP as well (though hopefully they locked it down). VBScript is just one language used by WSH (JScript is another, and plug ins exist for Perl, Python, Ruby, etc). WSH offers programs written in these languages access to any and all COM objects, which gives access to most Windows functionality. It's goddamn powerful...which is why it's used by such deadly viruses.
    --
    Hey freaks: now you're ju
  21. Re:Troll? Moi? by anethema · · Score: 3, Informative

    GOTO's make spaghetti code. It is very hard to trace through, especially if the code is uncommented. If you end up with a bug, you will have a very hard time trying to trace through your GOTO's to find it.

    Loops and functions keep things neet, organized and structured (assuming a half-competant programmer)

    This isnt a point of view thing. Some things are confusing and some arent, thats just the way it is.

    Try maintaining code full of goto's. Good luck.

    --


    It's easier to fight for one's principles than to live up to them.
  22. Re:Today we use Bash by shawn99452 · · Score: 3, Informative

    Your sig in C will also run out of stack space and crash very quickly.

  23. Re:Jave derived from BASIC??? by Anonymous Coward · · Score: 2, Informative

    How is that so? Was B derived from basic? I'm pretty sure it wasn't. Smalltalk maybe? I thought the flow went like this:

    1. B (short for Bell, where it was written)
    2. C
    3. Objective-C (C with some smalltalk stuff added)
    4. Java


    B isn't short for "Bell", it was an abbreviated version of BCPL, hence the name. C came after B, which raised the question of which language would succeed C-- P or D?

  24. Re:missing line by CRCulver · · Score: 3, Informative

    While I agree with the parent poster that programming shouldn't be fun again, please take a look at his posting history and notice that all his posts are the same, some lines that are barely on-topic, and then a final paragraph, each time slightly reworded, that exhorts readers to write to their congressmen. It is unfortunate that such attempts for karma-whoring are consistently modded-up.

  25. Re:Jave derived from BASIC??? by dasmegabyte · · Score: 2, Informative

    Uh, the progression is never this simple, man. Yes, syntactically, Java borrows from C and C++ heavily. But it's never so simple as X then Y then Z. Java borrows from everything -- inheriting from Object looks a lot like Objective-C, but calling instance methods looks a lot more like C++. And the concept of the Virtual Machine has a lot more in common with VB than it does with compiled, self executing, self managed languages.

    Similarily, C# borrows from both Java and C. It's not the end point of either. In fact, since people are still writing -- and revising -- C, Obj C, C++, Java, C#, BASIC and Visual Basic, you can't say any of them BECOME any of the others. They're each of them still their own thing.

    --
    Hey freaks: now you're ju
  26. Re:Today we use Bash by ajs318 · · Score: 5, Informative
    Better to use something like
    int main() { /* i wish this thing would indent properly */
    for (1;1;1) { /* will loop forever */
    printf("ajs318 is a better programmer than Jorkapp\n");
    };
    };
    Repeatedly calling main() from within main() probably would overflow the stack. It's the equivalent of using GOSUB in BASIC when you meant GOTO -- GOSUBs and function calls have to remember where they were called from, which is what a stack is used for. If the compiler you were using was tolerant enough that you could declare void main(), then it would last about twice as long before crashing and burning, due to not having to temporarily remember an integer it's later going to have to throw away.
    --
    Je fume. Tu fumes. Nous fûmes!
  27. Re:missing line by ajs318 · · Score: 3, Informative

    On a Spectrum or BBC micro, you will get a "no such variable" error -- the British BASIC dialects tended to prefer to crash out rather than silently assign 0 to variables on first reading. Although, "X = X + 1" will still work without predefining X, because the interpreter creates a variable X as soon as it sees it on the left-hand side of an assignment. Spectrum BASIC expected every statement to start with a keyword (verb), accessed by pressing a letter key, and so had to introduce "LET" for assignments -- "X = 1" would have to be written "LET X = 1" on the Spectrum because if you pressed X when a keyword was expected, you would get CLEAR.

    --
    Je fume. Tu fumes. Nous fûmes!
  28. Learn to count! by joel.neely · · Score: 4, Informative

    The program's source is the haiku, not its output.

  29. Never forget what BASIC stands for... by Rick+Genter · · Score: 2, Informative

    Beginner's

    All-purpose

    Symbolic

    Instruction

    Code

    Note the emphasis on Beginner's.

    Served me quite well in high school...<sigh/>

    --
    Don't underestimate the power of The Source
  30. Re:Today we use Bash by mog007 · · Score: 2, Informative

    Bah... a real coder's infinite for loop doesn't have ANY numbers.

    for (;;)
    printf("STOP MEEEEEEEEE\n");

  31. GNU Basic by R.+M.+Stallman · · Score: 2, Informative

    I would like to draw Slashdot readers' attention to the GNU/Liberty Basic Compiler Collection as a free alternative to proprietary implementations.

    --
    You can read more about the GNU project at http://www.gnu.org/.
  32. Re:Today we use Bash by BigMattG · · Score: 2, Informative

    Recent versions of GCC are actually smart about
    simple cases of tail recursion and are probably
    smart enough to expand the call into a loop.

  33. Re:Today we use Bash by ignavus · · Score: 2, Informative

    Why write "for (1;1;1)" ?

    According to K&R, it is perfectly OK to leave out any - or all - of the expressions inside the "for" loop header, and they themselves use "for (;;)" to implement an infinite loop. It means "loop without any initial action, without any test after each iteration, and without any action after each iteration".

    A "while(foo)" loop is exactly the same as "for (;foo;)". "for" loops are very versatile.

    --
    I am anarch of all I survey.
  34. Re:Obligatory Dijkstra quote by Sj0 · · Score: 2, Informative

    Quickbasic was the bigger brother. qbasic was v1.1 which shipped with Dos 5.0+. Quickbasic went on until it was renamed Professional Development System 7.0, then later Visual Basic for DOS 1.0. That was the last version made.

    http://www.qbxl.net/

    I'm a monster, you see. That's how I know all this. :P

    --
    It's been a long time.
  35. Re:BASIC got me going by cocotoni · · Score: 2, Informative

    And then, there is the free (as in no monetary exchange takes place) download of .NOT framework, with compilers for VB .NET, C#, J# and JScript .NET.

    Console application can be done without much fuss in notepad, if you care, and with a lot of trial and error tests, even a Windows.Forms application can be written.

    If you want a better IDE environment... well there is C#Builder from Borland, which is a free (as above) download for non-comercial use. There is also free (as in GPL) IDE for both C# and VB.NET called #develop (http://www.icsharpcode.net/OpenSource/SD/) but I have no experience with it.

    Fact is, kids these days have a world of options at their fingertips. Now, if only the programming could be made as interesting for them as it was for me some 20 odd years ago when I wrote 10 PRINT "Blah Blah" for the first time.

  36. Just not true by walterbyrd · · Score: 2, Informative

    Compiled BASIC, with functions, procedures, case structures, record types, local variables, etc. has been around about 25 years.

    You can write a program in MS-BASIC that's as well structured as any other language.

    If done correctly, BASIC is a remarkably readable language. And just about any BASIC created in the last 20 years has the features of FORTRAN and COBOL.