prog8/examples/test.p8

35 lines
651 B
Plaintext
Raw Normal View History

2023-05-16 21:10:33 +00:00
%import textio
%zeropage basicsafe
main {
2023-05-07 23:03:54 +00:00
sub start() {
str name1 = "name1"
str name2 = "name2"
uword[] @split names = [name1, name2, "name3"]
2023-05-31 18:09:03 +00:00
uword ww
; for ww in names {
; txt.print(ww)
; txt.spc()
; }
; txt.nl()
ubyte idx=1
names[idx] = 2000
txt.print_uw(names[1])
names[idx]++
txt.print_uw(names[1])
names[idx]--
txt.print_uw(names[1])
2023-05-31 18:09:03 +00:00
names = [1111,2222,3333]
for ww in names {
txt.print_uw(ww)
txt.spc()
}
txt.nl()
2023-05-31 18:09:03 +00:00
txt.print("end.")
2023-03-18 23:24:05 +00:00
}
}