'simple tableHere is a version for the GOTO averse. ;-)
limit = 200
dim locations$(2, limit)
[displayAll]
cls
if position <= limit then
print "Name: ";
textbox #name, ""
#name setfocus()
print " X:";
textbox #x, ""
print " Y:";
textbox #y, ""
button #add, "Add", [add]
else
print "Limit reached."
end if
if position > 0 then
table #t, locations$()
render #t
end if
wait
[add]
locations$(0, position) = #name contents$()
locations$(1, position) = #x contents$()
locations$(2, position) = #y contents$()
position = position + 1
goto [displayAll]
'simple table
global #name, #x, #y, limit, position
limit = 200
dim locations$(2, limit)
call displayAll
wait
sub displayAll
cls
if position <= limit then
print "Name: ";
textbox #name, ""
#name setfocus()
print " X:";
textbox #x, ""
print " Y:";
textbox #y, ""
button #add, "Add", add
else
print "Limit reached."
end if
if position > 0 then
table #t, locations$()
render #t
end if
end sub
sub add key$
locations$(0, position) = #name contents$()
locations$(1, position) = #x contents$()
locations$(2, position) = #y contents$()
position = position + 1
call displayAll
end sub
In the next lesson we will add some visual decoration to the program.
1 comment:
Thank you for this blog.
I have some suggestion for that topic. The most important things for that lesson are learn more about it and you need focus and to understand what you are doing and one of the main operation we should have a knowledge about it.
For more tips and information about it. Visit web programmer site.
Post a Comment