2017-05-30 22:43:01 +02:00
|
|
|
## STORE
|
2017-07-01 17:10:59 +02:00
|
|
|
default del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
2017-05-29 13:20:38 +02:00
|
|
|
# symbol entry
|
|
|
|
'test'
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be 'test'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 13:20:38 +02:00
|
|
|
|
|
|
|
# symbol entry (2)
|
|
|
|
'test
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be 'test'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 13:20:38 +02:00
|
|
|
|
|
|
|
# symbol entry (3)
|
|
|
|
''
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be ''
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 13:20:38 +02:00
|
|
|
|
|
|
|
# symbol entry (4)
|
|
|
|
'
|
|
|
|
-> stack size should be 1
|
|
|
|
-> stack should be ''
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 13:20:38 +02:00
|
|
|
|
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
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
|
|
|
# sto (2)
|
|
|
|
2 'a' sto a
|
|
|
|
-> stack should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# sto (3)
|
|
|
|
3 'b' sto b
|
|
|
|
-> stack should be 3
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
2017-05-25 12:33:51 +02:00
|
|
|
# rcl (1)
|
|
|
|
'a' rcl
|
|
|
|
-> stack should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
|
|
|
# rcl (2)
|
|
|
|
'b' rcl
|
2017-05-30 22:43:01 +02:00
|
|
|
-> stack should be 3
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
|
|
|
# rcl (2)
|
|
|
|
'var' rcl
|
2017-05-25 12:33:51 +02:00
|
|
|
-> error should be 5
|
2017-05-30 22:43:01 +02:00
|
|
|
-> stack should be 'var'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
|
|
|
# sto in prog then rcl
|
|
|
|
3 << 'r' sto >> eval r 'r' rcl
|
|
|
|
-> stack should be 3, 3
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
|
|
|
# purge (1)
|
|
|
|
a 'a' purge a
|
|
|
|
-> stack should be 2, 'a'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-25 12:33:51 +02:00
|
|
|
|
|
|
|
# purge (2)
|
|
|
|
'a' purge
|
|
|
|
-> error should be 5
|
|
|
|
-> stack size should be 0
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# purge (3)
|
|
|
|
3 'a' sto a 'a' purge
|
|
|
|
-> stack should be 3
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
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-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sto+ (2)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
'a' 2 sto+
|
|
|
|
a
|
|
|
|
-> stack should be 4
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 17:55:47 +02:00
|
|
|
|
|
|
|
# sto+ (3)
|
2017-05-29 16:02:52 +02:00
|
|
|
'a' sto+
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# sto+ (4)
|
|
|
|
3 'zz' sto+
|
|
|
|
-> stack should be 3, 'zz'
|
|
|
|
-> error should be 5
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
2017-05-29 16:02:52 +02:00
|
|
|
# sto- (1)
|
|
|
|
2 'a' sto
|
|
|
|
2 'a' sto-
|
|
|
|
a
|
|
|
|
-> stack should be 0
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sto- (2)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
'a' 2 sto-
|
|
|
|
a
|
|
|
|
-> stack should be 0
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 17:55:47 +02:00
|
|
|
|
|
|
|
# sto- (3)
|
2017-05-29 16:02:52 +02:00
|
|
|
'a' sto-
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# sto- (4)
|
|
|
|
3 'zz' sto-
|
|
|
|
-> stack should be 3, 'zz'
|
|
|
|
-> error should be 5
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
2017-05-29 16:02:52 +02:00
|
|
|
# sto* (1)
|
|
|
|
2 'a' sto
|
|
|
|
3 'a' sto*
|
|
|
|
a
|
|
|
|
-> stack should be 6
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sto* (2)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
'a' 3 sto*
|
|
|
|
a
|
|
|
|
-> stack should be 6
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 17:55:47 +02:00
|
|
|
|
|
|
|
# sto* (3)
|
2017-05-29 16:02:52 +02:00
|
|
|
'a' sto*
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# sto* (4)
|
|
|
|
3 'zz' sto*
|
|
|
|
-> stack should be 3, 'zz'
|
|
|
|
-> error should be 5
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
2017-05-29 16:02:52 +02:00
|
|
|
# sto/ (1)
|
2017-05-29 17:55:47 +02:00
|
|
|
2 'a' sto
|
|
|
|
6 'a' sto/
|
|
|
|
a
|
|
|
|
-> stack should be 3
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 17:55:47 +02:00
|
|
|
|
|
|
|
# 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
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sto/ (2)
|
|
|
|
'a' sto/
|
|
|
|
-> stack size should be 1
|
|
|
|
-> error should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# sto/ (4)
|
|
|
|
3 'zz' sto/
|
|
|
|
-> stack should be 3, 'zz'
|
|
|
|
-> error should be 5
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
2017-05-29 16:02:52 +02:00
|
|
|
# sneg (1)
|
|
|
|
7 'a' sto
|
|
|
|
'a' sneg
|
|
|
|
a
|
|
|
|
-> stack should be -7
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sneg (2)
|
|
|
|
sneg
|
|
|
|
-> error should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
2017-05-30 22:43:01 +02:00
|
|
|
# sneg (3)
|
|
|
|
'zz' sneg
|
|
|
|
-> error should be 5
|
|
|
|
-> stack should be 'zz'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
2017-05-29 16:02:52 +02:00
|
|
|
# sinv (1)
|
|
|
|
4 'a' sto
|
2017-05-30 22:43:01 +02:00
|
|
|
'a' sinv
|
2017-05-29 16:02:52 +02:00
|
|
|
a
|
|
|
|
-> stack should be 0.25
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-29 16:02:52 +02:00
|
|
|
|
|
|
|
# sinv (2)
|
|
|
|
sinv
|
|
|
|
-> error should be 2
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-30 22:43:01 +02:00
|
|
|
|
|
|
|
# sinv (3)
|
|
|
|
'zz' sinv
|
|
|
|
-> error should be 5
|
|
|
|
-> stack should be 'zz'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|
2017-05-31 22:39:14 +02:00
|
|
|
|
|
|
|
# clusr
|
|
|
|
3.14 'abc' sto clusr 'abc' rcl
|
|
|
|
-> error should be 5
|
|
|
|
-> stack should be 'abc'
|
2017-07-01 17:10:59 +02:00
|
|
|
del
|