_ (Negative Sign / Infinity) Noun/Other

Preceding an atom, negates it, resulting in a valid constant (scalar or vector).

This is different from applying Negate (-), which is a verb primitive that forms a phrase to be evaluated.

   5 _3 22
5 _3 22
   5 -3 22   NB. equivalent to: 5 - (3 22)
2 _17

Common uses

1. To embed negative numbers in a numeric vector or matrix.

2. (as Infinity) To serve as a docile placeholder in a numeric vector or matrix.

   ]z=: 2 3$ 0 1 _ 3 4 5
0 1 _
3 4 5
   1+z
1 2 _
4 5 6
   _ = z
0 0 1
0 0 0
   _ = 1+z
0 0 1
0 0 0

(Note: __ means "minus-infinity" and behaves in the same way as _.)

3. (as Infinity) To specify _ as the placeholder to be used for a badly-formed numeral when converting a string using Numbers (".).

   _ ". '33 -44 55.5 66.6.6 _77'
33 _44 55.5 _ _77

See Also


CategoryVoc

Vocabulary/under (last edited 2011-06-06 20:00:23 by IanClark)