I have done a bit of editing/commenting on your code that I hope helps (and doesn't come across as nagging!)
I basically edited up to a point and then just left notes. Maybe these notes are more helpful anyway, they take less time for me so perhaps I should just leave notes in future. Tell me what you think is most helpful.
rem programma tables 10-04-2014
`# cleaner to hide the mouse first
hide mouse
sync on
sw=screen width()/2
sh=screen height()/4
set text size 48
start:
repeat
cls 0
Print "Welkome to the tables."
print
input "Do you want to practice all the tables? (Y/N)? : ",$tafel
`# Validate input.
select upper$($tafel)
case "Y" : allTables = 1 : endcase
case "N" : allTables = 0 : endcase
case default
allTables = -1
print "You must answer 'Y' or 'N'. <PRESS ANY KEY>"
wait key
endcase
endselect
until allTables >= 0
if allTables=0
keuze_tafel:
cls 0
input "Which table do you want to practice (1-12)? : ";#per_tafel
if (#per_tafel<1) or (#per_tafel>12)
print "Sorry, lower than table 1 or higer than table 12 isn't a option."
print "Try again please."
goto keuze_tafel
endif
cls
print "Alright, you chose the table of "+str$(#per_tafel)+"."
print "Talk out loud the table of "+str$(#per_tafel)+" with answer."
do
input "How many seconds thinking time do you want (1-5)? : ";#tempo
select #tempo
case >5 : $err = "More than 5 seconds? That is very long. Try again." : endcase
case <1 : $err = "Less than 1 second? dat is very short. Try again." : endcase
case default : exit : endcase
endselect
print $err
wait key
loop
if #tempo>1 then $secs="seconds" else $secs="second"
print "Okay, you get ";#tempo;$secs;" to calculate the table of "+str$(#per_tafel) +"."
print "Are you ready?"
wait 2000
print "Let's go!..."
cls 0
rem ---------
tafel_opnieuw:
n=#per_tafel
for m=1 to 10
center text sw, sh, str$(m)+" x "+str$(n)+" ="
wait (#tempo*1000) :`# repeating this calculation is unnecessary, it should be done before the loop.
center text sw, sh+96, str$(n*m)
wait 1000
cls 0
next m
sync
cls 0
input "Its over, you want to try again (y/n)?";$antwoord
if ($antwoord="y")
print "Oke, here we go again!"
wait 2000
cls 0
print "Are you ready?"
wait 2000
print "Here we go..."
wait 3000
cls 0
goto tafel_opnieuw
else
input "Do you want to go back to the beginning (y/n)? : ";$begin
if ($begin="y")
print "Oke, we go back to the beginning...";
wait 2000
cls 0
goto start
else
goto eind
endif
endif
rem ------
else
print "oke we practice all the tables."
wait 2000
alle_tafels_oefenen:
`# this section is a replica, convert to a subroutine and call from both places.
input "How many seconds do you want to calculate? (1-5)? : ";#tempo2
if (#tempo2>5)
Print "More than 5 seconds is to long, try again."
wait 3000
cls 0
#tempo2=0
goto alle_tafels_oefenen:
endif
if (#tempo2<1)
Print "Less than 1 second is to short, try again."
wait 3000
cls 0
#tempo2=0
goto alle_tafels_oefenen:
endif
if (#tempo2=1)
print "Oke, you get ";#tempo2;" second to calculate."
else
print "Oke, you get ";#tempo2;" seconds to calculate."
endif
wait 2000
cls 0
input "Do you want to mix all the tables (y/n)? : ";$volgorde
if ($volgorde="y")
alle_tafels_door_elkaar:
print "Are you ready for the challenge?"
wait 2000
print "Here we go..."
wait 3000
cls 0
`randomize rnd(100) # this will not work well as the first number generated from rnd(100) will be the same every time.
randomize timer() :`# this randomizes using the computer clock, a constantly changing number.
`# the loop below will unlikely go through all tables, I can explain how to do this in a shuffled order if you would like.
for n=1 to 10
m=rnd(9)+1
a=rnd(9)+1
center text sw, sh, str$(m)+" x "+str$(a)+" ="
wait (#tempo2*1000)
center text sw, sh+96, str$(m*a)
wait 1000
cls 0
sync
next n
wait (#tempo2*1000)
cls 0
`# You have lots of yes/no inputs, it would be good to standardise these and maybe use one function or subroutine for them all.
input "It's over, do you want to try again (y/n)?";$antwoord3
if ($antwoord3="y")
print "Oke, Here we go again!"
wait 2000
goto alle_tafels_door_elkaar:
else
input "Do you want to go to the beginning (y/n)? : ";$begin3
if ($begin3="y")
print "Oke, we go back to the begining...";
wait 2000
cls 0
goto start
`# This is NOT GOOD. I have not complained about your other gotos because they have been over very short
`# distances and it wasn't too hard to see where they were going, but this one (and the one below)
`# are sending the program cursor far away so the program becomes difficult to follow.
else
goto eind
endif
endif
else
rem +++
alle_tafels_op_een_rij:
print "Are you ready for all the tables in a row?"
wait 2000
print "Here we go..."
wait 3000
cls 0
for n=1 to 10
for m=1 to 10
center text sw, sh, str$(m)+" x "+str$(n)+" ="
wait (#tempo2*1000)
center text sw, sh+96, str$(n*m)
wait 1000
cls 0
next m
sync
next n
wait (#tempo2*1000)
cls 0
input "It's over. Do you want to try again (y/n)?";$antwoord
if ($antwoord="y")
print "Oke, here wer go again!"
wait 2000
goto alle_tafels_op_een_rij:
else
input "Do you want to go back to the beginning (y/n)? : ";$begin2
if ($begin2="y")
print "Oke, we go back to the begin...";
wait 2000
cls 0
goto start
else
goto eind
endif
endif
rem +++
endif
endif
for n=1 to 10
for m=1 to 10
center text sw, sh, str$(m)+" x "+str$(n)+" ="
wait (#tempo*1000)
center text sw, sh+96, str$(n*m)
wait 1000
cls 0
next m
sync
next n
cls 0
input "Its over, do you want to try again (y/n)?";$antwoord
if ($antwoord="y")
print "Oke, here we go again!"
wait 2000
goto start:
else
`# This is the same as the eind sub so we could just go there instead of typing it all again.
print "Oke, have a nice day. See you next time!"
wait 2000
print "Adios!"
wait 2000
print "Au revoir!"
wait 2000
print "Bye bye!"
wait 2000
endif
`# This is BAD. Program flow should not drop into the eind routine.
`# Okay you have a goto up there that makes dropping impossible but still it is sloppy.
`# What if the goto got moved or deleted? Then the safety net is gone.
eind:
print "Oke, have a nice day. See you next time!"
wait 2000
print "Adios!"
wait 2000
print "Au revoir!"
wait 2000
print "Bye bye!"
wait 6000
end
You have a lot of 'wait' commands in your code, I do not like these. Why do you want to make the user wait?
You are using labels (eg eind: ) as signposts throughout your program, I do not like this either. It is a habit that most people go through but you will have to get out of that habit to write better programs. Ironically, it is very easy to get lost with all these signposts everywhere.

Learning how to use different kinds of loops will help you get rid of signposts. Sometimes it is not a big problem to use a goto here or there, if it is only a small jump and would be a pain to code another solution, but in general if you are using gotos you are probably doing it wrong.
Formerly OBese87.