mirror of
https://github.com/irmen/prog8.git
synced 2024-08-22 03:29:07 +00:00
34 lines
677 B
Lua
34 lines
677 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
|
|
str text = "44"
|
|
uword textptr = &text
|
|
|
|
ubyte nlen = conv.any2uword(textptr)
|
|
ubyte lastchr = text[nlen]
|
|
ubyte valid_operand
|
|
|
|
valid_operand = nlen>0 and lastchr==0
|
|
txt.print("\nvalidoper? ")
|
|
txt.print_ub(valid_operand)
|
|
txt.nl()
|
|
|
|
valid_operand = nlen>0
|
|
valid_operand = valid_operand and lastchr==0
|
|
|
|
txt.print("\nvalidoper? ")
|
|
txt.print_ub(valid_operand)
|
|
txt.nl()
|
|
|
|
|
|
valid_operand = nlen and lastchr==0
|
|
txt.print("\nvalidoper? ")
|
|
txt.print_ub(valid_operand)
|
|
txt.nl()
|
|
}
|
|
}
|