2017-05-25 12:33:51 +02:00
|
|
|
## VARS
|
|
|
|
|
2017-05-29 13:20:38 +02:00
|
|
|
# symbol entry
|
|
|
|
'test'
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be 'test'
|
|
|
|
erase
|
|
|
|
|
|
|
|
# symbol entry (2)
|
|
|
|
'test
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be 'test'
|
|
|
|
erase
|
|
|
|
|
|
|
|
# symbol entry (3)
|
|
|
|
''
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be ''
|
|
|
|
erase
|
|
|
|
|
|
|
|
# symbol entry (4)
|
|
|
|
'
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be ''
|
|
|
|
erase
|
|
|
|
|
2017-05-25 12:33:51 +02:00
|
|
|
# sto (1)
|
|
|
|
1 'a' sto
|
|
|
|
-> stack size should be 0
|
|
|
|
'a' a
|
|
|
|
-> stack should be 'a', 1
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto (2)
|
|
|
|
2 'a' sto a
|
|
|
|
-> stack should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# rcl (1)
|
|
|
|
'a' rcl
|
|
|
|
-> stack should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# rcl (2)
|
|
|
|
'b' rcl
|
|
|
|
-> error should be 5
|
|
|
|
-> stack should be 'b'
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto in prog then rcl
|
|
|
|
3 << 'r' sto >> eval r 'r' rcl
|
|
|
|
-> stack should be 3, 3
|
|
|
|
erase
|
|
|
|
|
|
|
|
# purge (1)
|
|
|
|
a 'a' purge a
|
|
|
|
-> stack should be 2, 'a'
|
|
|
|
erase
|
|
|
|
|
|
|
|
# purge (2)
|
|
|
|
'a' purge
|
|
|
|
-> error should be 5
|
|
|
|
-> stack size should be 0
|
2017-05-29 17:55:47 +02:00
|
|
|
erase
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sto+ (1)
|
2017-05-29 17:55:47 +02:00
|
|
|
8 'a' sto
|
2017-05-29 16:02:52 +02:00
|
|
|
2 'a' sto+
|
|
|
|
a
|
2017-05-29 17:55:47 +02:00
|
|
|
-> stack should be 10
|
2017-05-29 16:02:52 +02:00
|
|
|
erase
|
|
|
|
|
|
|
|
# sto+ (2)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
'a' 2 sto+
|
|
|
|
a
|
|
|
|
-> stack should be 4
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto+ (3)
|
2017-05-29 16:02:52 +02:00
|
|
|
'a' sto+
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto- (1)
|
|
|
|
2 'a' sto
|
|
|
|
2 'a' sto-
|
|
|
|
a
|
|
|
|
-> stack should be 0
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto- (2)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
'a' 2 sto-
|
|
|
|
a
|
|
|
|
-> stack should be 0
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto- (3)
|
2017-05-29 16:02:52 +02:00
|
|
|
'a' sto-
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto* (1)
|
|
|
|
2 'a' sto
|
|
|
|
3 'a' sto*
|
|
|
|
a
|
|
|
|
-> stack should be 6
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto* (2)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
'a' 3 sto*
|
|
|
|
a
|
|
|
|
-> stack should be 6
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto* (3)
|
2017-05-29 16:02:52 +02:00
|
|
|
'a' sto*
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto/ (1)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
6 'a' sto/
|
|
|
|
a
|
|
|
|
-> stack should be 3
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto/ (2)
|
2017-05-29 16:02:52 +02:00
|
|
|
6 'a' sto
|
2017-05-29 17:55:47 +02:00
|
|
|
'a' 2 sto/
|
2017-05-29 16:02:52 +02:00
|
|
|
a
|
|
|
|
-> stack should be 3
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sto/ (2)
|
|
|
|
'a' sto/
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sneg (1)
|
|
|
|
7 'a' sto
|
|
|
|
'a' sneg
|
|
|
|
a
|
|
|
|
-> stack should be -7
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sneg (2)
|
|
|
|
sneg
|
|
|
|
-> error should be 2
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sinv (1)
|
|
|
|
4 'a' sto
|
|
|
|
'a' sneg
|
|
|
|
a
|
|
|
|
-> stack should be 0.25
|
|
|
|
erase
|
|
|
|
|
|
|
|
# sinv (2)
|
|
|
|
sinv
|
|
|
|
-> error should be 2
|
|
|
|
erase
|