Announcement

Collapse
No announcement yet.

BASIC help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BASIC help

    Ok, this is going to sound dumb, but hear me out.

    My math teacher gave me a stack of papers with assignments on them. The assignments describe a computer print-out that I need to get the computer to display. The rules: I have to get these print-outs to display with a custom written program, and the programs must be written in BASIC.

    My question: What do I save a BASIC source code as? In C++ its .cpp, in C its .c, in VB its .vbs, so what do I save BASIC files as? And what kind of compiler do I need?

  • #2
    BASIC for a PC (as in the old version that shipped with DOS) used the .BAS extension. It was interperted, not compiled. However, I don't think MS has made any version since DOS 6.2 / Windows 3.1. You might find something that will interpert BASIC via Google.

    (This is also sssuming that you understand that VB is a form of BASIC, and that VB isn't what the teacher wants.)
    Thorn
    "If you can't be a good example, then you'll just have to be a horrible warning." - Catherine Aird

    Comment


    • #3
      Dear god.. schools are still teaching old school basic? SWEET! So that is how Gorilla Gorilla was migrated to Gorilla 2!
      Happiness is a belt-fed weapon.

      Comment


      • #4
        I do know that VB is a form of BASIC. I asked the teacher when she gave me the stuff if she meant VB, but sadly no... Its all BASIC. Luckilly I do have a Windows 3.1 box, though I dont know where I put it... Thanks though! You folks are awesome.

        Comment


        • #5
          Originally posted by Windblows User
          Ok, this is going to sound dumb, but hear me out.

          My math teacher gave me a stack of papers with assignments on them. The assignments describe a computer print-out that I need to get the computer to display. The rules: I have to get these print-outs to display with a custom written program, and the programs must be written in BASIC.

          My question: What do I save a BASIC source code as? In C++ its .cpp, in C its .c, in VB its .vbs, so what do I save BASIC files as? And what kind of compiler do I need?
          I don't know how much help this will be but check out this site: http://sip.clarku.edu/tutorials/True_BASIC.html

          I found it by doing a Google of "Programming with BASIC"

          Good luck on your assignment.
          I enjoy talking to myself...it's usually the only intelligent conversations I get to have.

          Comment


          • #6
            Originally posted by Windblows User
            Ok, this is going to sound dumb, but hear me out.

            My math teacher gave me a stack of papers with assignments on them. The assignments describe a computer print-out that I need to get the computer to display. The rules: I have to get these print-outs to display with a custom written program, and the programs must be written in BASIC.

            My question: What do I save a BASIC source code as? In C++ its .cpp, in C its .c, in VB its .vbs, so what do I save BASIC files as? And what kind of compiler do I need?

            Tell your teacher to pull her head out of her ass and allow you to do it in a language that doesn't teach bad practices and principles....

            But if she still makes you do it in Basic, use all IF THEN GOTO statements.

            Comment


            • #7
              Originally posted by Windblows User
              I do know that VB is a form of BASIC. I asked the teacher when she gave me the stuff if she meant VB, but sadly no... Its all BASIC. Luckilly I do have a Windows 3.1 box, though I dont know where I put it... Thanks though! You folks are awesome.
              Don't get frustrated when coding what appears to be exactly what you see, only to find it does not work. It seems there were "enhancements" made to BASIC for each system that claimed support for BASIC.

              On the Apple ][ with DOS 3.3 you had one BASIC or on other boot disks, Integer BASCIC.

              TI-99 4/A had variations in BASIC and add-ons not supported by the Apple][ and the other way around too.

              And many othe forms of BASIC had their special mods such as BASIC on the TRS-80 models, MS-DOS, Commodore, and even the Atari.

              I haven't touched BASIC in ages, but some common differences include:
              * Is declaration of variables required?
              * Does assignment require LET or is it optional?
              * Are arrays supported? How? Multi Dimentional Arrays? How?
              * Are multiple statements allowed per line? How?
              * Can assembley routines be called from BASIC? How? Do they return control to the BASIC code just after the location they were called? How?
              * How is File access performed?
              * How do you clear the screen? (CLS?, HOME? CLEAR? CLEAR SCREEN?)
              * How do you play sounds?
              * How are graphics enabled? Used? Supported?
              * What about sprites?
              * Is there a limit to line length for statements? What is it?

              there are many more. Even representation of symbols with decimal value over 127 (beyond old ASCII-- sometimes called "extended ASCII") will be different.

              Just because something is in BASIC does not mean a copy and paste will make that BASIC code work with your BASIC interpriter "as-is."

              Comment


              • #8
                Pick up the Feb 2005 issue of Nuts and Volts Magazine, it has an article about all kinds of basic (called "The basics of basic" I think).

                LosT

                Comment


                • #9
                  Originally posted by LosT
                  Pick up the Feb 2005 issue of Nuts and Volts Magazine, it has an article about all kinds of basic (called "The basics of basic" I think).

                  LosT
                  Also in the March 2005 issue there is a small section that has some stuff on BASIC. I think it's in the Stamp section.
                  "It is difficult not to wonder whether that combination of elements which produces a machine for labor does not create also a soul of sorts, a dull resentful metallic will, which can rebel at times". Pearl S. Buck

                  Comment


                  • #10
                    After you write your code in BASIC for the teacher, ask if you can learn how to start a fire by rubbing sticks together. Sheesh. I had to learn useless code in college (MINITAB anyone?), I swear the teacher gets a kickback.

                    Comment


                    • #11
                      I would complain and protest normally, but its extra credit in a class I'm not doing so well in, so I dont mind.

                      Comment


                      • #12
                        Originally posted by che
                        So that is how Gorilla was migrated to Gorilla 2!
                        It's comforting that I'm not the only with memories of that game. The edge detection was great (throw a banana really fast and it sometimes went through the buildings), and people would get quite upset with my slightly modified version of the game...

                        Originally posted by astcell
                        I swear the teacher gets a kickback
                        Only from the students with a more righteous sense of justice.

                        Originally posted by Windblows User
                        I do have a Windows 3.1 box
                        I'm assuming the assignment is fairly simple, and QBasic is pretty easy to pick up. If you didn't follow che's link, it includes the source code to the game. This includes the ever-popular:

                        Code:
                         ON ERROR GOTO FuckOff
                        (You may wish to leave this part out of your assignment. )

                        Comment


                        • #13
                          Originally posted by Voltage Spike
                          It's comforting that I'm not the only with memories of that game.
                          I take it Agent Orange and I are the only two who remember when the game was new ?

                          Comment


                          • #14
                            Originally posted by astcell
                            I take it Agent Orange and I are the only two who remember when the game was new ?
                            I suppose that depends on when it was new. I found it (and nibbles?) while futzing around with QBasic on MS-DOS 5.0. I somehow skipped 4.0, going straight from 3.1 to 5.0, so I might have missed the original release. I was very impressed with the game and played for hours on end, but I can't, for the life of me, remember why. Perhaps it was because it was the most advanced game I owned for which I could view the source code.

                            Comment


                            • #15
                              Originally posted by Voltage Spike
                              It's comforting that I'm not the only with memories of that game. The edge detection was great (throw a banana really fast and it sometimes went through the buildings), and people would get quite upset with my slightly modified version of the game...

                              Heh.. the nice thing was with a couple slight modificatins, you had NUCLEAR BANNANAS!
                              Now.. if someone would just mod the game for monkey knife fights...
                              Happiness is a belt-fed weapon.

                              Comment

                              Working...
                              X