awtk/tests/fscripts/demo_expr.fs

25 lines
302 B
Forth
Raw Normal View History

2022-08-23 11:21:48 +08:00
var a = 10
var b = 20
2021-01-02 12:36:30 +08:00
print(a<b)
print(1+2)
print(1-2)
print(1*2)
print(1/2)
print(3%2)
print(a||b)
print(a&&b)
print(a|b)
print(a&b)
print(!a)
print(~a)
print(a<b)
print(a<=b)
print(a>b)
print(a>=b)
print((1+2)*(2+3))
print(sin(a) + sin(b))
print(set(a, a+1))
print(set(a, a+b))
print("abc" + "123")