System Function STOP

From NARS2000
Revision as of 14:21, 14 November 2015 by WikiSysop (talk | contribs) (Created page with "<h1>Quad Stop - '''⎕STOP'''     (System Function)</h1> ==Monadic Function — Query STOP Property== <table border="1" cellpadding="5" cellspacing="0" rules="...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Quad Stop - ⎕STOP     (System Function)

Monadic Function — Query STOP Property

Z←⎕STOP R queries the STOP property of the function named in R, and returns a numeric vector of line numbers in Z.
R is a character scalar or vector name of a user-defined function/operator or Magic Function.
Z is a numeric vector of line numbers where the function named in R stops execution when encountered. A value of 0 in the result means that execution stops just prior to leaving the function, allowing the user to examine the result and all local variables.


For example:

      ⎕STOP 'f'
0 1 2 3
      ⎕STOP '#DydDotDot'
0 2



Dyadic Function — Set STOP Property

Z←L ⎕STOP R sets the STOP property of the function named in R for the line numbers in L, and returns a numeric vector of line numbers in Z.
R is a character scalar or vector name of a user-defined function/operator or Magic Function.
L is a numeric vector of line numbers in the named function where execution is to stop when that line number is encountered. If L is an empty vector, the STOP property of the named function is removed from all line numbers. If a number in L does not correspond to a line number in the named function, that number is ignored.
Z is a numeric vector subset of L where the named function stops execution when encountered. The values in the result are in ascending order. A value of 0 in the result means that execution stops just prior to leaving the function, allowing the user to examine the result and all local variables. The Display property of the result is OFF, meaning that the result does not display unless explicitly forced such as with ⎕←.


For example:

      ⎕←0 1 2 3 ⎕STOP 'f'
0 1 2 3
      ⎕←0 2 3 4 5 6 7 8 9 ⎕STOP '#DydDotDot'
0 1 2 3 4 5