assert.

assert. control word is used in 明確 定義(:).
assert. T
An assertion failure is signalled if single 句子 T is not an 陣列of all 1s. Assertions are evaluated or not according to flag controlled by 9!:34 and 9!:35 .
 

例如:
cfi=: 4 : 0 " 0                 y.-th combination of i.x.
 assert. 0<=y.
 assert. y.=<.y.
 assert. y.<2^x.
 v=. +/\(i.x.)!x.
 m=. (y.<v)i. 1
 (m,x.) ci (y.-m{0,v)
)

ci=: 4 : 0 " 1 0     
 'm n'=. x.
 if. 0=m do.
  i.0
 else.
  v=. +/\ (m-1)!(1-m)}.i.-n
  k=. (v>y.) i. 1
  k,(1+k)+(x.-1,1+k)ci(y.-k{0,v)
 end.
)

   5 cfi 6
0 1

   5 cfi 6+i.10
0 1
0 2
0 3
0 4
1 2
1 3
1 4
2 3
2 4
3 4

   5 cfi 33
|assertion failure: cfi
|       y.<2^x.
   5 cfi 6.2
|assertion failure: cfi
|       y.=<.y.
   5 cfi 'a'
|domain error: cfi
|   y.=    <.y.

下個前個字彙索引主選單