mirror of
https://github.com/irmen/prog8.git
synced 2025-11-02 13:16:07 +00:00
28 lines
539 B
Lua
28 lines
539 B
Lua
%option enable_floats
|
|
%import textio
|
|
%zeropage basicsafe
|
|
%option no_sysinit
|
|
|
|
main {
|
|
|
|
float f
|
|
|
|
sub start() {
|
|
txt.print("classic float pointer+1: ")
|
|
txt.print_uwhex(&f, true)
|
|
txt.spc()
|
|
txt.print_uwhex(&f + 1, true)
|
|
txt.spc()
|
|
txt.print_uw(&f + 1 - &f)
|
|
txt.nl()
|
|
|
|
txt.print("typed float pointer+1: ")
|
|
txt.print_uwhex(&&f, true)
|
|
txt.spc()
|
|
txt.print_uwhex(&&f + 1, true)
|
|
txt.spc()
|
|
txt.print_uw(&&f + 1 - &&f)
|
|
txt.nl()
|
|
}
|
|
}
|