Zilde: Difference between revisions

Jump to navigation Jump to search
262 bytes added ,  15:53, 4 May 2020
no edit summary
No edit summary
No edit summary
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Built-in|Zilde|⍬}}, or '''Zero-tilde''' (which the common name is a portmanteau of), is the [[empty]] [[numeric]] [[vector]]. It shares its name with the [[glyph]] used to represent it, a zero overstruck with a tilde. It is the [[shape]] of any [[scalar]], although its own shape is <source lang=apl inline>,0</source>. This is because, as a vector, it has exactly one [[axis]], and this axis has length 0. Zilde is equivalent to <source lang=apl inline>⍳0</source> and <source lang=apl inline>⍴0</source> and <source lang=apl inline>0⍴0</source>. Being [[numeric]], Zilde's [[prototype]] is 0.
{{Built-in|Zilde|⍬}}, or '''Zero-tilde''' (which the common name is a portmanteau of), is the [[empty]] [[numeric]] [[vector]]. It shares its name with the [[glyph]] used to represent it, a zero [[overstrike|overstruck]] with a tilde. It is the [[shape]] of any [[scalar]], although its own shape is <source lang=apl inline>,0</source>. This is because, as a vector, it has exactly one [[axis]], and this axis has length 0. Zilde is equivalent to <source lang=apl inline>⍳0</source> and <source lang=apl inline>⍴0</source> and <source lang=apl inline>0⍴0</source>. Being [[numeric]], Zilde's [[prototype]] is 0.


The [[glyph]] Zilde is notable in that it represents an array rather than a [[primitive function]] or [[primitive operator]]. In most APLs it is the only array literal which is produced using its own token rather than being part of a family of array literals like [[numeric literal]]s, [[string]]s, or [[system constant]]s (an exception is [[SHARP APL]]'s [[nil]] (<source lang=apl inline>∘</source>), which is the same as <source lang=apl inline>⊂⍬</source>).
The [[glyph]] Zilde is notable in that it represents an array rather than a [[primitive function]] or [[primitive operator]]. This usage was introduced in [[NARS]] and included in [[Dyalog APL]] and many other dialects influenced by these. In most of these APLs it is the only array literal which is produced using its own token rather than being part of a family of array literals like [[numeric literal]]s, [[string]]s, or [[system constant]]s. A similar special literal is [[SHARP APL]]'s [[nil]] (<source lang=apl inline>∘</source>), which corresponds to <source lang=apl inline>⊂⍬</source>, and Dyalog APL's [[namespace]] reference to the root of the [[workspace]] (<source lang=apl inline>#</source>).


It should be noted that the empty numeric vector (<source lang=apl inline>⍬</source>) is distinct from the empty character vector (<source lang=apl inline>''</source>) even though they have the same shape and the same elements:
It should be noted that the empty numeric vector (<source lang=apl inline>⍬</source>) is distinct from the empty character vector (<source lang=apl inline>''</source>) even though they have the same shape and the same elements:

Navigation menu