prog8/compiler/test/comparisons/more_compares.p8

606 lines
22 KiB
Plaintext
Raw Normal View History

2023-03-26 21:44:06 +00:00
%zeropage basicsafe
%import textio
2023-03-29 00:23:02 +00:00
%import floats
%import string
2023-03-26 21:44:06 +00:00
main {
sub start() {
2023-03-29 00:23:02 +00:00
test_string()
txt.nl()
test_compare_variable()
txt.nl()
test_compare_literal()
}
sub test_string() {
str name="john"
if (string.compare(name, "aaa")==0) or (string.compare(name, "john")==0) or (string.compare(name, "bbb")==0) {
txt.print("name1 ok\n")
}
if (string.compare(name, "aaa")==0) or (string.compare(name, "zzz")==0) or (string.compare(name, "bbb")==0) {
txt.print("name2 fail!\n")
}
if name=="aaa" or name=="john" or name=="bbb"
txt.print("name1b ok\n")
if name=="aaa" or name=="zzz" or name=="bbb"
txt.print("name2b fail!\n")
}
sub test_compare_literal() {
2024-02-21 16:04:39 +00:00
byte @shared b = -100
ubyte @shared ub = 20
word @shared w = -20000
uword @shared uw = 2000
float @shared f = -100
2023-03-26 21:44:06 +00:00
txt.print("all 1: ")
2024-02-22 22:39:31 +00:00
txt.print_ub(b == -100 as ubyte)
txt.print_ub(b != -99 as ubyte)
txt.print_ub(b < -99 as ubyte)
txt.print_ub(b <= -100 as ubyte)
txt.print_ub(b > -101 as ubyte)
txt.print_ub(b >= -100 as ubyte)
txt.print_ub(ub ==20 as ubyte)
txt.print_ub(ub !=19 as ubyte)
txt.print_ub(ub <21 as ubyte)
txt.print_ub(ub <=20 as ubyte)
txt.print_ub(ub>19 as ubyte)
txt.print_ub(ub>=20 as ubyte)
2023-03-26 21:44:06 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(w == -20000 as ubyte)
txt.print_ub(w != -19999 as ubyte)
txt.print_ub(w < -19999 as ubyte)
txt.print_ub(w <= -20000 as ubyte)
txt.print_ub(w > -20001 as ubyte)
txt.print_ub(w >= -20000 as ubyte)
txt.print_ub(uw == 2000 as ubyte)
txt.print_ub(uw != 2001 as ubyte)
txt.print_ub(uw < 2001 as ubyte)
txt.print_ub(uw <= 2000 as ubyte)
txt.print_ub(uw > 1999 as ubyte)
txt.print_ub(uw >= 2000 as ubyte)
2023-03-29 00:23:02 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(f == -100.0 as ubyte)
txt.print_ub(f != -99.0 as ubyte)
txt.print_ub(f < -99.0 as ubyte)
txt.print_ub(f <= -100.0 as ubyte)
txt.print_ub(f > -101.0 as ubyte)
txt.print_ub(f >= -100.0 as ubyte)
2023-03-26 21:44:06 +00:00
txt.nl()
2023-03-29 00:23:02 +00:00
2023-03-26 21:44:06 +00:00
txt.print("all 0: ")
2024-02-22 22:39:31 +00:00
txt.print_ub(b == -99 as ubyte)
txt.print_ub(b != -100 as ubyte)
txt.print_ub(b < -100 as ubyte)
txt.print_ub(b <= -101 as ubyte)
txt.print_ub(b > -100 as ubyte)
txt.print_ub(b >= -99 as ubyte)
txt.print_ub(ub ==21 as ubyte)
txt.print_ub(ub !=20 as ubyte)
txt.print_ub(ub <20 as ubyte)
txt.print_ub(ub <=19 as ubyte)
txt.print_ub(ub>20 as ubyte)
txt.print_ub(ub>=21 as ubyte)
2023-03-26 21:44:06 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(w == -20001 as ubyte)
txt.print_ub(w != -20000 as ubyte)
txt.print_ub(w < -20000 as ubyte)
txt.print_ub(w <= -20001 as ubyte)
txt.print_ub(w > -20000 as ubyte)
txt.print_ub(w >= -19999 as ubyte)
txt.print_ub(uw == 1999 as ubyte)
txt.print_ub(uw != 2000 as ubyte)
txt.print_ub(uw < 2000 as ubyte)
txt.print_ub(uw <= 1999 as ubyte)
txt.print_ub(uw > 2000 as ubyte)
txt.print_ub(uw >= 2001 as ubyte)
2023-03-29 00:23:02 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(f == -99.0 as ubyte)
txt.print_ub(f != -100.0 as ubyte)
txt.print_ub(f < -100.0 as ubyte)
txt.print_ub(f <= -101.0 as ubyte)
txt.print_ub(f > -100.0 as ubyte)
txt.print_ub(f >= -99.0 as ubyte)
2023-03-29 00:23:02 +00:00
txt.nl()
txt.print("all .: ")
if b == -100 txt.chrout('.')
if b != -99 txt.chrout('.')
if b < -99 txt.chrout('.')
if b <= -100 txt.chrout('.')
if b > -101 txt.chrout('.')
if b >= -100 txt.chrout('.')
if ub ==20 txt.chrout('.')
if ub !=19 txt.chrout('.')
if ub <21 txt.chrout('.')
if ub <=20 txt.chrout('.')
if ub>19 txt.chrout('.')
if ub>=20 txt.chrout('.')
txt.spc()
if w == -20000 txt.chrout('.')
if w != -19999 txt.chrout('.')
if w < -19999 txt.chrout('.')
if w <= -20000 txt.chrout('.')
if w > -20001 txt.chrout('.')
if w >= -20000 txt.chrout('.')
if uw == 2000 txt.chrout('.')
if uw != 2001 txt.chrout('.')
if uw < 2001 txt.chrout('.')
if uw <= 2000 txt.chrout('.')
if uw > 1999 txt.chrout('.')
if uw >= 2000 txt.chrout('.')
txt.spc()
if f == -100.0 txt.chrout('.')
if f != -99.0 txt.chrout('.')
if f < -99.0 txt.chrout('.')
if f <= -100.0 txt.chrout('.')
if f > -101.0 txt.chrout('.')
if f >= -100.0 txt.chrout('.')
txt.nl()
txt.print(" no !: ")
if b == -99 txt.chrout('!')
if b != -100 txt.chrout('!')
if b < -100 txt.chrout('!')
if b <= -101 txt.chrout('!')
if b > -100 txt.chrout('!')
if b >= -99 txt.chrout('!')
if ub ==21 txt.chrout('!')
if ub !=20 txt.chrout('!')
if ub <20 txt.chrout('!')
if ub <=19 txt.chrout('!')
if ub>20 txt.chrout('!')
if ub>=21 txt.chrout('!')
txt.spc()
if w == -20001 txt.chrout('!')
if w != -20000 txt.chrout('!')
if w < -20000 txt.chrout('!')
if w <= -20001 txt.chrout('!')
if w > -20000 txt.chrout('!')
if w >= -19999 txt.chrout('!')
if uw == 1999 txt.chrout('!')
if uw != 2000 txt.chrout('!')
if uw < 2000 txt.chrout('!')
if uw <= 1999 txt.chrout('!')
if uw > 2000 txt.chrout('!')
if uw >= 2001 txt.chrout('!')
txt.spc()
if f == -99.0 txt.chrout('!')
if f != -100.0 txt.chrout('!')
if f < -100.0 txt.chrout('!')
if f <= -101.0 txt.chrout('!')
if f > -100.0 txt.chrout('!')
if f >= -99.0 txt.chrout('!')
txt.nl()
txt.print("all .: ")
if b == -100 txt.chrout('.') else txt.chrout('!')
if b != -99 txt.chrout('.') else txt.chrout('!')
if b < -99 txt.chrout('.') else txt.chrout('!')
if b <= -100 txt.chrout('.') else txt.chrout('!')
if b > -101 txt.chrout('.') else txt.chrout('!')
if b >= -100 txt.chrout('.') else txt.chrout('!')
if ub ==20 txt.chrout('.') else txt.chrout('!')
if ub !=19 txt.chrout('.') else txt.chrout('!')
if ub <21 txt.chrout('.') else txt.chrout('!')
if ub <=20 txt.chrout('.') else txt.chrout('!')
if ub>19 txt.chrout('.') else txt.chrout('!')
if ub>=20 txt.chrout('.') else txt.chrout('!')
txt.spc()
if w == -20000 txt.chrout('.') else txt.chrout('!')
if w != -19999 txt.chrout('.') else txt.chrout('!')
if w < -19999 txt.chrout('.') else txt.chrout('!')
if w <= -20000 txt.chrout('.') else txt.chrout('!')
if w > -20001 txt.chrout('.') else txt.chrout('!')
if w >= -20000 txt.chrout('.') else txt.chrout('!')
if uw == 2000 txt.chrout('.') else txt.chrout('!')
if uw != 2001 txt.chrout('.') else txt.chrout('!')
if uw < 2001 txt.chrout('.') else txt.chrout('!')
if uw <= 2000 txt.chrout('.') else txt.chrout('!')
if uw > 1999 txt.chrout('.') else txt.chrout('!')
if uw >= 2000 txt.chrout('.') else txt.chrout('!')
txt.spc()
if f == -100.0 txt.chrout('.') else txt.chrout('!')
if f != -99.0 txt.chrout('.') else txt.chrout('!')
if f < -99.0 txt.chrout('.') else txt.chrout('!')
if f <= -100.0 txt.chrout('.') else txt.chrout('!')
if f > -101.0 txt.chrout('.') else txt.chrout('!')
if f >= -100.0 txt.chrout('.') else txt.chrout('!')
txt.nl()
txt.print("all .: ")
if b == -99 txt.chrout('!') else txt.chrout('.')
if b != -100 txt.chrout('!') else txt.chrout('.')
if b < -100 txt.chrout('!') else txt.chrout('.')
if b <= -101 txt.chrout('!') else txt.chrout('.')
if b > -100 txt.chrout('!') else txt.chrout('.')
if b >= -99 txt.chrout('!') else txt.chrout('.')
if ub ==21 txt.chrout('!') else txt.chrout('.')
if ub !=20 txt.chrout('!') else txt.chrout('.')
if ub <20 txt.chrout('!') else txt.chrout('.')
if ub <=19 txt.chrout('!') else txt.chrout('.')
if ub>20 txt.chrout('!') else txt.chrout('.')
if ub>=21 txt.chrout('!') else txt.chrout('.')
txt.spc()
if w == -20001 txt.chrout('!') else txt.chrout('.')
if w != -20000 txt.chrout('!') else txt.chrout('.')
if w < -20000 txt.chrout('!') else txt.chrout('.')
if w <= -20001 txt.chrout('!') else txt.chrout('.')
if w > -20000 txt.chrout('!') else txt.chrout('.')
if w >= -19999 txt.chrout('!') else txt.chrout('.')
if uw == 1999 txt.chrout('!') else txt.chrout('.')
if uw != 2000 txt.chrout('!') else txt.chrout('.')
if uw < 2000 txt.chrout('!') else txt.chrout('.')
if uw <= 1999 txt.chrout('!') else txt.chrout('.')
if uw > 2000 txt.chrout('!') else txt.chrout('.')
if uw >= 2001 txt.chrout('!') else txt.chrout('.')
txt.spc()
if f == -99.0 txt.chrout('!') else txt.chrout('.')
if f != -100.0 txt.chrout('!') else txt.chrout('.')
if f < -100.0 txt.chrout('!') else txt.chrout('.')
if f <= -101.0 txt.chrout('!') else txt.chrout('.')
if f > -100.0 txt.chrout('!') else txt.chrout('.')
if f >= -99.0 txt.chrout('!') else txt.chrout('.')
2023-03-26 21:44:06 +00:00
txt.nl()
b = -100
while b <= -20
b++
txt.print_b(b)
txt.print(" -19\n")
b = -100
while b < -20
b++
txt.print_b(b)
txt.print(" -20\n")
ub = 20
while ub <= 200
ub++
txt.print_ub(ub)
txt.print(" 201\n")
ub = 20
while ub < 200
ub++
txt.print_ub(ub)
txt.print(" 200\n")
w = -20000
while w <= -8000 {
w++
}
txt.print_w(w)
txt.print(" -7999\n")
w = -20000
while w < -8000 {
w++
}
txt.print_w(w)
txt.print(" -8000\n")
uw = 2000
while uw <= 8000 {
uw++
}
txt.print_uw(uw)
txt.print(" 8001\n")
uw = 2000
while uw < 8000 {
uw++
}
txt.print_uw(uw)
txt.print(" 8000\n")
2023-03-29 00:23:02 +00:00
f = 0.0
floats.print(f)
2023-03-29 00:23:02 +00:00
while f<2.2 {
f+=0.1
floats.print(f)
2023-03-29 00:23:02 +00:00
}
floats.print(f)
2023-03-29 00:23:02 +00:00
txt.print(" 2.2\n")
}
sub test_compare_variable() {
2024-02-21 16:04:39 +00:00
byte @shared b = -100
ubyte @shared ub = 20
word @shared w = -20000
uword @shared uw = 2000
float @shared f = -100
2023-03-29 00:23:02 +00:00
2024-02-21 16:04:39 +00:00
byte @shared minus_100 = -100
byte @shared minus_99 = -99
byte @shared minus_20 = -20
byte @shared minus_101 = -101
ubyte @shared nineteen = 19
ubyte @shared twenty = 20
ubyte @shared twenty1 = 21
ubyte @shared twohundred = 200
float @shared f_minus_100 = -100.0
float @shared f_minus_101 = -101.0
float @shared f_minus_99 = -99.0
float @shared twodottwo = 2.2
word @shared minus8000 = -8000
word @shared eightthousand = 8000
word @shared w_min_20000 = -20000
word @shared w_min_19999 = -19999
word @shared w_min_20001 = -20001
uword @shared twothousand = 2000
uword @shared twothousand1 = 2001
uword @shared nineteen99 = 1999
2023-03-29 00:23:02 +00:00
txt.print("all 1: ")
2024-02-22 22:39:31 +00:00
txt.print_ub(b == minus_100 as ubyte)
txt.print_ub(b != minus_99 as ubyte)
txt.print_ub(b < minus_99 as ubyte)
txt.print_ub(b <= minus_100 as ubyte)
txt.print_ub(b > minus_101 as ubyte)
txt.print_ub(b >= minus_100 as ubyte)
txt.print_ub(ub ==twenty as ubyte)
txt.print_ub(ub !=nineteen as ubyte)
txt.print_ub(ub <twenty1 as ubyte)
txt.print_ub(ub <=twenty as ubyte)
txt.print_ub(ub>nineteen as ubyte)
txt.print_ub(ub>=twenty as ubyte)
2023-03-29 00:23:02 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(w == w_min_20000 as ubyte)
txt.print_ub(w != w_min_19999 as ubyte)
txt.print_ub(w < w_min_19999 as ubyte)
txt.print_ub(w <= w_min_20000 as ubyte)
txt.print_ub(w > w_min_20001 as ubyte)
txt.print_ub(w >= w_min_20000 as ubyte)
txt.print_ub(uw == twothousand as ubyte)
txt.print_ub(uw != twothousand1 as ubyte)
txt.print_ub(uw < twothousand1 as ubyte)
txt.print_ub(uw <= twothousand as ubyte)
txt.print_ub(uw > nineteen99 as ubyte)
txt.print_ub(uw >= twothousand as ubyte)
2023-03-29 00:23:02 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(f == f_minus_100 as ubyte)
txt.print_ub(f != f_minus_99 as ubyte)
txt.print_ub(f < f_minus_99 as ubyte)
txt.print_ub(f <= f_minus_100 as ubyte)
txt.print_ub(f > f_minus_101 as ubyte)
txt.print_ub(f >= f_minus_100 as ubyte)
2023-03-29 00:23:02 +00:00
txt.nl()
txt.print("all 0: ")
2024-02-22 22:39:31 +00:00
txt.print_ub(b == minus_99 as ubyte)
txt.print_ub(b != minus_100 as ubyte)
txt.print_ub(b < minus_100 as ubyte)
txt.print_ub(b <= minus_101 as ubyte)
txt.print_ub(b > minus_100 as ubyte)
txt.print_ub(b >= minus_99 as ubyte)
txt.print_ub(ub ==twenty1 as ubyte)
txt.print_ub(ub !=twenty as ubyte)
txt.print_ub(ub <twenty as ubyte)
txt.print_ub(ub <=nineteen as ubyte)
txt.print_ub(ub>twenty as ubyte)
txt.print_ub(ub>=twenty1 as ubyte)
2023-03-29 00:23:02 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(w == w_min_20001 as ubyte)
txt.print_ub(w != w_min_20000 as ubyte)
txt.print_ub(w < w_min_20000 as ubyte)
txt.print_ub(w <= w_min_20001 as ubyte)
txt.print_ub(w > w_min_20000 as ubyte)
txt.print_ub(w >= w_min_19999 as ubyte)
txt.print_ub(uw == nineteen99 as ubyte)
txt.print_ub(uw != twothousand as ubyte)
txt.print_ub(uw < twothousand as ubyte)
txt.print_ub(uw <= nineteen99 as ubyte)
txt.print_ub(uw > twothousand as ubyte)
txt.print_ub(uw >= twothousand1 as ubyte)
2023-03-29 00:23:02 +00:00
txt.spc()
2024-02-22 22:39:31 +00:00
txt.print_ub(f == f_minus_99 as ubyte)
txt.print_ub(f != f_minus_100 as ubyte)
txt.print_ub(f < f_minus_100 as ubyte)
txt.print_ub(f <= f_minus_101 as ubyte)
txt.print_ub(f > f_minus_100 as ubyte)
txt.print_ub(f >= f_minus_99 as ubyte)
2023-03-29 00:23:02 +00:00
txt.nl()
txt.print("all .: ")
if b == minus_100 txt.chrout('.')
if b != minus_99 txt.chrout('.')
if b < minus_99 txt.chrout('.')
if b <= minus_100 txt.chrout('.')
if b > minus_101 txt.chrout('.')
if b >= minus_100 txt.chrout('.')
if ub == twenty txt.chrout('.')
if ub != nineteen txt.chrout('.')
if ub < twenty1 txt.chrout('.')
if ub <= twenty txt.chrout('.')
if ub> nineteen txt.chrout('.')
if ub>= twenty txt.chrout('.')
txt.spc()
if w == w_min_20000 txt.chrout('.')
if w != w_min_19999 txt.chrout('.')
if w < w_min_19999 txt.chrout('.')
if w <= w_min_20000 txt.chrout('.')
if w > w_min_20001 txt.chrout('.')
if w >= w_min_20000 txt.chrout('.')
if uw == twothousand txt.chrout('.')
if uw != twothousand1 txt.chrout('.')
if uw < twothousand1 txt.chrout('.')
if uw <= twothousand txt.chrout('.')
if uw > nineteen99 txt.chrout('.')
if uw >= twothousand txt.chrout('.')
txt.spc()
if f == f_minus_100 txt.chrout('.')
if f != f_minus_99 txt.chrout('.')
if f < f_minus_99 txt.chrout('.')
if f <= f_minus_100 txt.chrout('.')
if f > f_minus_101 txt.chrout('.')
if f >= f_minus_100 txt.chrout('.')
txt.nl()
txt.print(" no !: ")
if b == minus_99 txt.chrout('!')
if b != minus_100 txt.chrout('!')
if b < minus_100 txt.chrout('!')
if b <= minus_101 txt.chrout('!')
if b > minus_100 txt.chrout('!')
if b >= minus_99 txt.chrout('!')
if ub == twenty1 txt.chrout('!')
if ub != twenty txt.chrout('!')
if ub < twenty txt.chrout('!')
if ub <= nineteen txt.chrout('!')
if ub> twenty txt.chrout('!')
if ub>= twenty1 txt.chrout('!')
txt.spc()
if w == w_min_20001 txt.chrout('!')
if w != w_min_20000 txt.chrout('!')
if w < w_min_20000 txt.chrout('!')
if w <= w_min_20001 txt.chrout('!')
if w > w_min_20000 txt.chrout('!')
if w >= w_min_19999 txt.chrout('!')
if uw == nineteen99 txt.chrout('!')
if uw != twothousand txt.chrout('!')
if uw < twothousand txt.chrout('!')
if uw <= nineteen99 txt.chrout('!')
if uw > twothousand txt.chrout('!')
if uw >= twothousand1 txt.chrout('!')
txt.spc()
if f == f_minus_99 txt.chrout('!')
if f != f_minus_100 txt.chrout('!')
if f < f_minus_100 txt.chrout('!')
if f <= f_minus_101 txt.chrout('!')
if f > f_minus_100 txt.chrout('!')
if f >= f_minus_99 txt.chrout('!')
txt.nl()
txt.print("all .: ")
if b == minus_100 txt.chrout('.') else txt.chrout('!')
if b != minus_99 txt.chrout('.') else txt.chrout('!')
if b < minus_99 txt.chrout('.') else txt.chrout('!')
if b <= minus_100 txt.chrout('.') else txt.chrout('!')
if b > minus_101 txt.chrout('.') else txt.chrout('!')
if b >= minus_100 txt.chrout('.') else txt.chrout('!')
if ub == twenty txt.chrout('.') else txt.chrout('!')
if ub != nineteen txt.chrout('.') else txt.chrout('!')
if ub < twenty1 txt.chrout('.') else txt.chrout('!')
if ub <= twenty txt.chrout('.') else txt.chrout('!')
if ub> nineteen txt.chrout('.') else txt.chrout('!')
if ub>=twenty txt.chrout('.') else txt.chrout('!')
txt.spc()
if w == w_min_20000 txt.chrout('.') else txt.chrout('!')
if w != w_min_19999 txt.chrout('.') else txt.chrout('!')
if w < w_min_19999 txt.chrout('.') else txt.chrout('!')
if w <= w_min_20000 txt.chrout('.') else txt.chrout('!')
if w > w_min_20001 txt.chrout('.') else txt.chrout('!')
if w >= w_min_20000 txt.chrout('.') else txt.chrout('!')
if uw == twothousand txt.chrout('.') else txt.chrout('!')
if uw != twothousand1 txt.chrout('.') else txt.chrout('!')
if uw < twothousand1 txt.chrout('.') else txt.chrout('!')
if uw <= twothousand txt.chrout('.') else txt.chrout('!')
if uw > nineteen99 txt.chrout('.') else txt.chrout('!')
if uw >= twothousand txt.chrout('.') else txt.chrout('!')
txt.spc()
if f == f_minus_100 txt.chrout('.') else txt.chrout('!')
if f != f_minus_99 txt.chrout('.') else txt.chrout('!')
if f < f_minus_99 txt.chrout('.') else txt.chrout('!')
if f <= f_minus_100 txt.chrout('.') else txt.chrout('!')
if f > f_minus_101 txt.chrout('.') else txt.chrout('!')
if f >= f_minus_100 txt.chrout('.') else txt.chrout('!')
txt.nl()
txt.print("all .: ")
if b == minus_99 txt.chrout('!') else txt.chrout('.')
if b != minus_100 txt.chrout('!') else txt.chrout('.')
if b < minus_100 txt.chrout('!') else txt.chrout('.')
if b <= minus_101 txt.chrout('!') else txt.chrout('.')
if b > minus_100 txt.chrout('!') else txt.chrout('.')
if b >= minus_99 txt.chrout('!') else txt.chrout('.')
if ub == twenty1 txt.chrout('!') else txt.chrout('.')
if ub !=twenty txt.chrout('!') else txt.chrout('.')
if ub <twenty txt.chrout('!') else txt.chrout('.')
if ub <=nineteen txt.chrout('!') else txt.chrout('.')
if ub>twenty txt.chrout('!') else txt.chrout('.')
if ub>= twenty1 txt.chrout('!') else txt.chrout('.')
txt.spc()
if w == w_min_20001 txt.chrout('!') else txt.chrout('.')
if w != w_min_20000 txt.chrout('!') else txt.chrout('.')
if w < w_min_20000 txt.chrout('!') else txt.chrout('.')
if w <= w_min_20001 txt.chrout('!') else txt.chrout('.')
if w > w_min_20000 txt.chrout('!') else txt.chrout('.')
if w >= w_min_19999 txt.chrout('!') else txt.chrout('.')
if uw == nineteen99 txt.chrout('!') else txt.chrout('.')
if uw != twothousand txt.chrout('!') else txt.chrout('.')
if uw < twothousand txt.chrout('!') else txt.chrout('.')
if uw <= nineteen99 txt.chrout('!') else txt.chrout('.')
if uw > twothousand txt.chrout('!') else txt.chrout('.')
if uw >= twothousand1 txt.chrout('!') else txt.chrout('.')
txt.spc()
if f == f_minus_99 txt.chrout('!') else txt.chrout('.')
if f != f_minus_100 txt.chrout('!') else txt.chrout('.')
if f < f_minus_100 txt.chrout('!') else txt.chrout('.')
if f <= f_minus_101 txt.chrout('!') else txt.chrout('.')
if f > f_minus_100 txt.chrout('!') else txt.chrout('.')
if f >= f_minus_99 txt.chrout('!') else txt.chrout('.')
txt.nl()
b = minus_100
while b <= minus_20
b++
txt.print_b(b)
txt.print(" -19\n")
b = minus_100
while b < -minus_20
b++
txt.print_b(b)
txt.print(" -20\n")
ub = 20
while ub <= twohundred
ub++
txt.print_ub(ub)
txt.print(" 201\n")
ub = 20
while ub < twohundred
ub++
txt.print_ub(ub)
txt.print(" 200\n")
w = w_min_20000
while w <= minus8000 {
w++
}
txt.print_w(w)
txt.print(" -7999\n")
w = w_min_20000
while w < minus8000 {
w++
}
txt.print_w(w)
txt.print(" -8000\n")
uw = 2000
while uw <= eightthousand {
uw++
}
txt.print_uw(uw)
txt.print(" 8001\n")
uw = 2000
while uw < eightthousand {
uw++
}
txt.print_uw(uw)
txt.print(" 8000\n")
f = 0.0
floats.print(f)
2023-03-29 00:23:02 +00:00
while f<twodottwo {
f+=0.1
floats.print(f)
2023-03-29 00:23:02 +00:00
}
floats.print(f)
2023-03-29 00:23:02 +00:00
txt.print(" 2.2\n")
2023-03-26 21:44:06 +00:00
}
}