2,951
edits
No edit summary |
m (Glyphs category) |
||
(5 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> | 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 (< | [[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 36: | Line 36: | ||
== References == | == References == | ||
<references/> | <references/> | ||
{{APL | {{APL glyphs}}[[Category:APL syntax]][[Category:Glyphs]] |