prog8/examples/test.p8
2020-11-22 16:54:02 +01:00

74 lines
1.3 KiB
Lua

%import textio
%import floats
%zeropage basicsafe
%import test_stack
main {
sub start() {
float uw1
const float uw2 = 2.2
uw1 = 1.1
if uw1<uw2
txt.chrout('.')
else
txt.chrout('!')
if uw1<=uw2
txt.chrout('.')
else
txt.chrout('!')
if uw1>uw2
txt.chrout('!')
else
txt.chrout('.')
if uw1>=uw2
txt.chrout('!')
else
txt.chrout('.')
if uw1==uw2
txt.chrout('!')
else
txt.chrout('.')
if uw1!=uw2
txt.chrout('.')
else
txt.chrout('!')
txt.chrout(' ')
uw1 = 2.2
if uw1<uw2
txt.chrout('!')
else
txt.chrout('.')
if uw1<=uw2
txt.chrout('.')
else
txt.chrout('!')
if uw1>uw2
txt.chrout('!')
else
txt.chrout('.')
if uw1>=uw2
txt.chrout('.')
else
txt.chrout('!')
if uw1==uw2
txt.chrout('.')
else
txt.chrout('!')
if uw1!=uw2
txt.chrout('!')
else
txt.chrout('.')
test_stack.test()
txt.chrout('\n')
}
}