High minus: Difference between revisions

Jump to navigation Jump to search
980 bytes added ,  00:24, 11 December 2019
no edit summary
mNo edit summary
No edit summary
Line 1: Line 1:
{{Built-in|High minus|¯}} or '''Negative''' is the character 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.
{{Built-in|High minus|¯}} or '''Negative''' is the character 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 (<source lang=k inline>-</source>) 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 ==
=== 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 built-ins}}
{{APL built-ins}}

Navigation menu