mirror of
https://github.com/irmen/prog8.git
synced 2024-09-11 00:54:31 +00:00
62 lines
1.1 KiB
Plaintext
62 lines
1.1 KiB
Plaintext
~ main {
|
|
|
|
var .float flt = -9.87e-21
|
|
const .word border = $0099
|
|
const cbyte2 = 2222
|
|
const cbyte2b = cbyte2*3 ; @todo fix scope not found crash
|
|
var counter = 1
|
|
|
|
start:
|
|
counter ++
|
|
main.counter ++
|
|
; @todo float augassign
|
|
flt += 1000.1
|
|
flt *= 2.34
|
|
flt *= flt
|
|
|
|
;[border] &= 2 ; @todo augassign on dereference
|
|
|
|
XY*=3 ; @todo operator
|
|
XY=XY/0 ; @todo zerodiv (during expression to code generation) @todo operator
|
|
XY=XY//0 ; @todo zerodiv (during expression to code generation) @todo operator
|
|
|
|
; @todo incr by more than 1
|
|
[AX]++
|
|
[AX]++
|
|
A=0
|
|
; @todo decr by more than 1
|
|
[AX]--
|
|
[AX]--
|
|
|
|
|
|
block2.b2var++
|
|
block2.start()
|
|
return 44.123
|
|
|
|
sub varssub()->() {
|
|
sub goodbye ()->() {
|
|
var xxxxxx ; @todo vars in sub?
|
|
memory y = $c000 ; @todo memvars in sub?
|
|
const q = 22 ; @todo const in sub?
|
|
|
|
y++
|
|
return
|
|
}
|
|
|
|
}
|
|
sub derp ()->() {
|
|
const q = 22
|
|
A = q *4 ; @todo fix scope not found error
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
~ block2 {
|
|
var b2var = 0
|
|
|
|
start:
|
|
return
|
|
}
|