13!:0 y
|
Reset. Reset stack與disable (0) or enable
(1) suspension. Nearly all facilities in 13!:
family require that suspension enabled; all examples below
assume that suspension is enabled: 13!:0 ]1
|
|
13!:1 y |
Display Stack. See also 13!:18.
|
|
13!:2 y |
Query Stops.
|
|
13!:3 y |
Set Stops. 明確 stops are requested by name與
line number in 引數 y,which contains zero
or more stop specifications separated by semicolons.
Each stop specification indicates a name, line numbers (if any)
for 單邊case, a colon,與line numbers (if any) for
雙邊case. An asterisk indicates "all",與a tilde indicates
"except for". 例如:
13!:3 'f 0' |
f 單邊line 0 |
13!:3 'f :2' |
f 雙邊line 2 |
13!:3 'f 0 2:1' |
f 單邊ic 0 2,雙邊 1 |
13!:3 'f 0; g :*' |
f 單邊ic 0 and g all雙邊 |
13!:3 '* 0:0' |
單邊ic 0 and雙邊 0 |
13!:3 'a* *:*; ~ab* *:*' |
All 單邊ic與雙邊whose names begin with a,
except for any beginning with ab |
f=: 3 : 0
10
11
:
20
)
13!:3 'f 1:0' Stop at f 單邊 line 1,雙邊line 0
f ''
|stop: f
| 11
|f[1]
13!:0 ]1 Clear stack與enable suspension
3 f 4
|stop: f
| 20
|f[:0]
|
13!:4 y |
Run Again. Resume 執行 at 當前line. 例如:
g=: 3 : ('t=. 2*y.'; '1+t')
3 4,g 'abc'
|domain error: g
| t=.2 *y.
|g[0]
y. six-space indent indicates suspension
abc Local value of y.
y.=. 25 Redefine local value of y.
13!:4 '' Run again
3 4 51
|
13!:5 y |
Run 下個. Resume 執行 at 下個 line.
例如:
h=: 3 : ('t=. 2 3*y.'; '1+t')
3 4,h 5 6 7
|length error: h
| t=.2 3 *y.
|h[0]
t=. 99 six-space indent indicates suspension
13!:5 '' Run 下個
3 4 100
|
13!:6 y |
Exit與Return. Exit 動詞/副詞/連接詞 at top
of stack, returning result y . 例如:
g=: 3 : ('t=. 2*y.'; '1+t')
3 4,g 'abc'
|domain error: g
| t=.2 *y.
|g[0]
13!:6 [9 Exit g with result 9
3 4 9
h=: 2&*
3 4,h 'abc'
|domain error: h
|h[0]
13!:6 [97 Exit h with result 97
3 4 97
|
13!:7 y |
Continue. Resume 執行 at line number y
|
|
[x] 13!:8 y |
Signal. Signal error number {.,y
(see 9!:8)with optional text x
|
|
[x] 13!:9 y |
Rerun. Resume 執行 by rerunning 動詞/副詞/連接詞
on top of stack with specified引數. Thus:
plus=: +
plus/'abc'
|domain error: plus
|plus[:0]
13!:13 '' See below re interpretation of stack
+----+-+-+-+-++-----+--+
|plus|3|0|3|+||+-+-+| |
| | | | | |||b|c|| |
| | | | | ||+-+-+| |
+----+-+-+-+-++-----+--+
2 (13!:9) 3 Rerun, getting anor error
|domain error: plus
|plus[:0]
13!:13 '' Note左與右args ('a' and 5)
+----+-+-+-+-++-----+--+
|plus|3|0|3|+||+-+-+| |
| | | | | |||a|5|| |
| | | | | ||+-+-+| |
+----+-+-+-+-++-----+--+
1 (13!:9) 5 Rerun
6
|
[x]13!:10 y |
Rerun execute. Rerun with specified executed引數
|
|
13!:11 y
|
Error Number. Last error number
|
|
13!:12 y
|
Error Message. Last error message
|
|
13!:13 y |
Stack. If suspension is enabled, 13!:13 ''
produces an 8-column 矩陣of information on 動詞/副詞/連接詞
on stack:
0 | Name |
1 | Error number or 0 if not in error |
2 | Line number |
3 | Name class: 3, 1, or 2, denoting 動詞, 副詞, or 連接詞 |
4 | Linear representation of entity |
5 | name of defining script |
6 | 引數(s) individually boxed |
7 | Locals as a 2-column 矩陣of name與value |
在last two columns, 名詞 are included per se,與動詞,
副詞,與連接詞 are represented by linear forms. 例如:
mean=: sum % #
sum=: plus/
plus=: 4 : 'x.+y.'
mean 'abcd'
|domain error: plus
| x. +y.
|plus[:0]
13!:13 '' Note tacit 定義have no locals
+----+-+-+-+-----------++------+------+
|plus|3|0|3|4 : 'x.+y.'||+-+-+ |+--+-+|
| | | | | |||c|d| ||x.|c||
| | | | | ||+-+-+ |+--+-+|
| | | | | || ||y.|d||
| | | | | || |+--+-+|
+----+-+-+-+-----------++------+------+
|sum |0|0|3|plus/ ||+----+| |
| | | | | |||abcd|| |
| | | | | ||+----+| |
+----+-+-+-+-----------++------+------+
|mean|0|0|3|sum % # ||+----+| |
| | | | | |||abcd|| |
| | | | | ||+----+| |
+----+-+-+-+-----------++------+------+ |
13!:14 |
Query Latent Expression.
|
|
13!:15
|
Set Latent Expression. latent expression is executed
when 執行 is about to be suspended; error messages are suppressed;
any continuation must be programmed 在latent expression.
|
|
13!:16 y |
Trace. See below.
|
|
13!:17 y |
Query. Is suspension enabled? (Set by 13!:0)
|
|
13!:18 |
Stack Text. Like 13!:1,but gives stack
as a literal矩陣.
|