2,962
edits
mNo edit summary |
m (Glyphs category) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Built-in|High minus|¯}} or '''Negative''' is the | {{Built-in|High minus|¯}} or '''Negative''' is the [[glyph]] used in [[numeric literal]]s to indicate that a number is [[negate]]d. [[APL syntax]] dictates that it be distinct from the function [[Negate]] in order to allow all [[number]]s to be expressed as numeric literals. This ability is particularly useful in [[stranding]] or vector notation, since a number obtained from [[function]] application is harder to use in a strand—depending on the type of stranding available, it must either be parenthesized or cannot be stranded at all. It also allows negative numbers to be used as left [[argument]]s to functions, or as [[operand]]s. | ||
A high minus is also used in the TI-Basic programming language to differentiate negation from subtraction.<ref>TI-Basic Developer: [http://tibasicdev.wikidot.com/68k:negative The ‾ Command]</ref> | |||
[[J]] uses a "low minus" (an underscore; <source lang=j inline>_</source>) as negative sign, while [[K]] requires at least one space between a dash (<code>-</code>) and a numeric literal to access the subtraction function as opposed to having the dash be interpreted as a negative sign. | |||
== Examples == | == Examples == | ||
Line 24: | Line 28: | ||
¯3 | ¯3 | ||
</source> | </source> | ||
== External links == | |||
{{APL | === Lessons === | ||
* [https://chat.stackexchange.com/rooms/52405/conversation/lesson-1-introduction-to-arrays-in-apl#40620874 APL Cultivation] | |||
=== Documentation === | |||
* [https://help.dyalog.com/latest/index.htm#Language/Introduction/Variables/Numbers.htm Dyalog] | |||
* [https://www.jsoftware.com/help/dictionary/d030.htm J Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/under J NuVoc] (as <source lang=j inline>_</source>) | |||
== References == | |||
<references/> | |||
{{APL glyphs}}[[Category:APL syntax]][[Category:Glyphs]] |