mirror of
https://github.com/irmen/prog8.git
synced 2024-11-21 09:32:52 +00:00
todo
This commit is contained in:
parent
93a0a41e73
commit
3ee6058524
@ -1,7 +1,7 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- BUG: fix @initonce for variables that end up in zeropage.
|
||||
- BUG: fix @initonce for variables that end up in zeropage. They remain uninitialized altogether now. Fix it or don't allow it?
|
||||
- add unit tests for @initonce variables
|
||||
- add docs about variables with @initonce initialization
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
%import textio
|
||||
%option no_sysinit
|
||||
%zeropage dontuse
|
||||
%zeropage basicsafe
|
||||
|
||||
; INIT ONCE tests
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
@ -26,6 +28,11 @@ main {
|
||||
dump()
|
||||
txt.nl()
|
||||
|
||||
repeat 10 {
|
||||
footgun()
|
||||
}
|
||||
txt.nl()
|
||||
|
||||
sub dump() {
|
||||
txt.print_uw(w0)
|
||||
txt.spc()
|
||||
@ -47,4 +54,12 @@ main {
|
||||
txt.nl()
|
||||
}
|
||||
}
|
||||
|
||||
sub footgun() {
|
||||
; TODO should just be a nonlocal variable outside of the subroutine...?
|
||||
ubyte @shared @initonce @requirezp variable = 42 ; BUG: is never initialized now
|
||||
txt.print_ub(variable)
|
||||
txt.spc()
|
||||
variable++
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user