Debug 13!:

See Section II.J與 script system\main\debug.ijs.

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
1Error number or 0 if not in error
2Line number
3Name class: 3, 1, or 2, denoting 動詞, 副詞, or 連接詞
4Linear representation of entity
5name of defining script
6引數(s) individually boxed
7Locals 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矩陣.



連接詞 13!:16 controls tracing.
u     13!:16 n
(r,c) 13!:16 n
右引數 n specifies maximum 層級of 函數 call to be traced: 0 means no trace; 1 means immediate 執行 only; _ means trace everything; etc. 左引數can be 動詞 to be used for displaying 陣列 在trace (and is not itself traced during tracing). It may also be 整數s r,c,whence system default display is used, clipped to r rows and c columns. (Two numbers suffice as clipping parameters because output of an n-dimensional 陣列is 2-dimensional on screen.) Finally, it may be empty 向量, whence 當前trace level與display controls are shown. result is i.0 0.例如:

trace=: 13!:16
lr =: 3 : '5!:5<''y.'''   Linear display of an陣列
_ _ trace _ Trace everything; display everything
9 trace 1 Trace immediate 執行 only; display maximum of 9 rows
": trace n Same as _ _ trace n
lr trace n Linear display of trace output

Tracing 提供s information on results within a line; action labels 0 單邊, 1 單邊, 9 paren, etc., are from parse 表格in Section II.E, and reflect activities of interpreter with high fidelity.
   _ _ (13!:16) _                    Trace everything; display everything

   i.4                               input 句子
 --------------- 0 單邊 ------      action
 i.                                  動詞
 4                                   引數
 0 1 2 3                             result
 ==============================      end of parse
0 1 2 3                              result of input 句子

   (i.2 4) +/ .* *: 5 * 10 20 30 40  input 句子
 --------------- 2雙邊-------
 5                                   左引數
 *                                   動詞
 10 20 30 40                         右引數
 50 100 150 200                      result
 --------------- 0 單邊 ------
 i.                                  動詞
 2 4                                 引數
 0 1 2 3                             |result
 4 5 6 7                             |
 --------------- 9 paren ------
 0 1 2 3
 4 5 6 7
 --------------- 3 副詞 -----
 +
 /
 +/
 --------------- 4 conj -------
 +/
  .
 *
 +/ .*
 --------------- 1 單邊 ------      Words to 左of *: are parsed
 *:                                  first because an operator may "grab"
 50 100 150 200                      動詞 .
 2500 10000 22500 40000
 --------------- 2雙邊-------
 0 1 2 3                             |左引數
 4 5 6 7                             |
 +/ .*                               動詞
 2500 10000 22500 40000              右引數
 175000 475000                       result
 ==============================      end of parse
175000 475000                        result of input 句子

下個前個字彙索引主選單