nxtbasic : this loop runs automatically
Posted: Mon Jul 29, 2024 7:55 am
hello, good day.
why does the loop automatically with gosub and sub ?
thanks.
greetings
--------------------------------------
SCREEN 128
StartEdit:
Loop:
Key$=GET
if Key$="D" then g = 129 : test()
Goto loop
end
sub test()
print "HALLO"
end sub
---------------------------------------
--------------------------------------
SCREEN 128
StartEdit:
Loop:
Key$=GET
if Key$="D" then g = 129 : gosub test
Goto loop
end
test:
print "HALLO"
return
---------------------------------------
it is ok without g = 129
--------------------------------------
SCREEN 128
StartEdit:
Loop:
Key$=GET
if Key$="D" then gosub test
Goto loop
end
test:
print "HALLO"
return
--------------------------------------
why does the loop automatically with gosub and sub ?
thanks.
greetings
--------------------------------------
SCREEN 128
StartEdit:
Loop:
Key$=GET
if Key$="D" then g = 129 : test()
Goto loop
end
sub test()
print "HALLO"
end sub
---------------------------------------
--------------------------------------
SCREEN 128
StartEdit:
Loop:
Key$=GET
if Key$="D" then g = 129 : gosub test
Goto loop
end
test:
print "HALLO"
return
---------------------------------------
it is ok without g = 129
--------------------------------------
SCREEN 128
StartEdit:
Loop:
Key$=GET
if Key$="D" then gosub test
Goto loop
end
test:
print "HALLO"
return
--------------------------------------