sarrogin:
Your code can be assembled in a much more organized manner. Many on this forum consider using gotos as poor programming practice, to which I agree. I have taken a few minutes to re-write your code in a more structured manner using subroutines. I hope you can see the benefits of structuring your programs this way.
Rem Project: Dark Basic Pro Project
Rem Created: Monday, February 14, 2011
Rem ***** Main Source File *****
repeat
gosub start
print "wanna convert again? (Y/N)"
keypress = 0
repeat
if keystate(21) = 1 then keypress = 21
if keystate(49) = 1 then keypress = 49
until keypress > 0
until keypress = 49
end
start:
cls
print "what ya wish to convert?"
print "Press 1 for temperature, 2 for distance"
keypress = 0
repeat
if keystate(2) = 1 then keypress = 1
if keystate(3) = 1 then keypress = 2
UNTIL keypress > 0
if keypress = 1 then gosub sub1
if keypress = 2 then gosub sub2
return
sub1:
cls
Print "Please Enter Temperature In Centigrade: ";
Input C
F = (1.8 * C) + 32
Print C;" degrees centigrade equals "; F;" degrees Fahrenheit."
return
sub2:
cls
print "please enter miles"
input m
k# = m * 1.609344
print m;" miles = "; k# ;" KM!"
return
Good luck.
LB