Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Learning Basic Programming

Name: Anonymous 2009-08-07 6:23

Lets all band together to learn how to program for those who dont. Basic is a language that we can all agree on to learn. We can all post code and collaborate until we can program. Ill start!

10 INPUT "What is your name: ", U$
20 PRINT "Hello "; U$
30 INPUT "How many stars do you want: ", N
40 S$ = ""
50 FOR I = 1 TO N
60 S$ = S$ + "*"
70 NEXT I
80 PRINT S$
90 INPUT "Do you want more stars? ", A$
100 IF LEN(A$) = 0 THEN GOTO 90
110 A$ = LEFT$(A$, 1)
120 IF A$ = "Y" OR A$ = "y" THEN GOTO 30
130 PRINT "Goodbye "; U$
140 END

Name: Anonymous 2009-08-07 6:26

Good this is just what I came here for!

Sub DeckMaker()

Dim BasicDeck(52, 4)

               
 For Index = 1 To 13
    Select Case Index
        Case 1
            FaceValue = "Ace"
            CardValueBJ = 11
            CardValuePoker = 13
        Case 2
            FaceValue = "2"
            CardValueBJ = 2
            CardValuePoker = 1
        Case 3
            FaceValue = "3"
            CardValueBJ = 3
            CardValuePoker = 2
        Case 4
            FaceValue = "4"
            CardValueBJ = 4
            CardValuePoker = 3
        Case 5
            FaceValue = "5"
            CardValueBJ = 5
            CardValuePoker = 4
        Case 6
            FaceValue = "6"
            CardValueBJ = 6
            CardValuePoker = 5
        Case 7
            FaceValue = "7"
            CardValueBJ = 7
            CardValuePoker = 6
        Case 8
            FaceValue = "8"
            CardValueBJ = 8
            CardValuePoker = 7
        Case 9
            FaceValue = "9"
            CardValueBJ = 9
            CardValuePoker = 8
        Case 10
            FaceValue = "10"
            CardValueBJ = 10
            CardValuePoker = 9
        Case 11
            FaceValue = "Jack"
            CardValueBJ = 10
            CardValuePoker = 10
        Case 12
            FaceValue = "Queen"
            CardValueBJ = 10
            CardValuePoker = 11
        Case 13
            FaceValue = "King"
            CardValueBJ = 10
            CardValuePoker = 12
        End Select
       
    BasicDeck(Index, 1) = FaceValue
    BasicDeck(Index, 2) = "Hearts"
    BasicDeck(Index, 3) = CardValueBJ
    BasicDeck(Index, 4) = CardValuePoker
   
    BasicDeck(Index + 13, 1) = FaceValue
    BasicDeck(Index + 13, 2) = "Clubs"
    BasicDeck(Index + 13, 3) = CardValueBJ
    BasicDeck(Index + 13, 4) = CardValuePoker
 
    BasicDeck(Index + 26, 1) = FaceValue
    BasicDeck(Index + 26, 2) = "Diamonds"
    BasicDeck(Index + 26, 3) = CardValueBJ
    BasicDeck(Index + 26, 4) = CardValuePoker
   
    BasicDeck(Index + 39, 1) = FaceValue
    BasicDeck(Index + 39, 2) = "Spades"
    BasicDeck(Index + 39, 3) = CardValueBJ
    BasicDeck(Index + 39, 4) = CardValuePoker
   
 Next Index



End Sub

Name: Anonymous 2009-08-07 6:34

i approve this.

Name: Anonymous 2009-08-07 6:54

Basic is a language that we can all agree on
( ≖‿≖)

Name: Anonymous 2009-08-07 7:19

Name: 1000 sagetank army 2009-08-07 7:24

10 PRINT "Nice work gentlemen.  That was some excellent sage."
20 PRINT
30 PRINT " You gained 1000 experience points and rose to level 15."
40 PRINT "●█████▄▄▄▄▄▄▄▄"
50 PRINT "▄▅███████▅▄▃▂"
60 PRINT "███sage Tank███████►"
70 PRINT "◥☼▲⊙▲⊙▲⊙▲⊙▲⊙▲☼◤"
80 PRINT "Press any key to celebrate the destruction of Frozen-Void's thread!"
90 DO : LOOP WHILE INKEY$ = ""
100 END

Name: Anonymous 2009-08-07 8:01

10 *Grabs Dick*
20 GOTO 10
30 END

Name: Anonymous 2009-08-07 8:03

>>7
Oh god not you again.

Name: Anonymous 2009-08-07 11:14

>>1
Basic was popular before the advent of GUIs because it has a built-in text editor that's very easy to understand. That was its best feature. Its other good features (dynamic typing and interactive evaluation) are shared by a lot of other languages such as Scheme and Python. Using these other languages is preferable, because Basic encourages a programming style which is presently relegated to assembler and old versions of Fortran.

I don't think young programmers today will get much of anywhere by learning Basic.

Name: Anonymous 2009-08-07 11:16

I don't think young programmers today will get much of anywhere by learning Basic.
Thank you for making me realise this!!!

Name: Anonymous 2009-08-07 11:30

tweet@1 VisualBasic.Net is way too complex, Basic better

Name: Roar shack 2009-08-07 11:42

Give me man's little finger and I will produce information. Computer not necessary.

Name: Anonymous 2011-02-03 0:39

Don't change these.
Name: Email:
Entire Thread Thread List