Beginning Programming with Just BASIC -- Tutorial 5: Arrays

preview_player
Показать описание
In which I discuss how to use arrays, and how to use them in conjunction with loops.
Рекомендации по теме
Комментарии
Автор

An array is basically a set of variables. They're just a handy way of organizing data. If you wanted to store the names of, say, everyone in a classroom, you might need 30 variables. Or just one array. Also arrays interface nicely with loops. Keep watching, you might get the gist of things.

CivilDefenseEngineer
Автор

It stands for "dimensions" and gives the maximum number of elements an array can hold. (So it knows how much memory to allocate to the program)

CivilDefenseEngineer
Автор

why the values in 2d array is not displaying in rows and columns? Thank you!

roivincentplacente
Автор

Is JustBASIC an odd exception to the rule that arrays are indexed beginning at zero (not 1)?

ckildegaard
Автор

for i=1 to 5
for j=1 to 5
print mat$(i, j);" ";
next j
print
next i
this is how you print in correct order coulmn and files.

CommunistSpyware
Автор

Well, for one I don't see an "end if" anywhere. Also, I think it's bad practice to put a branch label inside of an if-statement (e.g. [wrong]), because if you try to enter the branch without going through the if, you're going to come to an "end if" at the end that it doesn't understand.

CivilDefenseEngineer
Автор

its a grid where you can put stuffs, each square has its own coordinates and such.

CommunistSpyware
Автор

Sorry but im having problems AGAIN
Everytime I try to run any program (ex print "hello world" ) it say "Runtime Error:FileSystemAccessDenied (see error.log for more information)

danieljay
Автор

Why were you expecting 16 inputs? You only changed the inner loop to 4 but the outer loop was still 5. 4x5=20. Basic maths lol

tinpot
Автор

also, i wish i knew this when i wrote a programme that deal cards =="
1329 lines of code for 18 cards

clockwise
Автор

why does this not work??
[start]
print "Hello what is your name?"
input name$
print "hello "; name$
print "Lets start the quiz "; name$;"!"
Print "Who is the creator of Microsoft?"
input answer1$
if answer1$ = "Bill Gates" then
print "good job!"
else
[wrong]
print "Sorry thats not right! Play again?"
input wrong1$
if wrong1$ = yes then
goto[start]
else
end


danieljay
Автор

... i should have watched this earlier...

rainick
visit shbcf.ru