Glyph: Difference between revisions

Jump to navigation Jump to search
980 bytes added ,  16:11, 7 May 2021
No edit summary
Line 10: Line 10:


== Bi-glyphs ==
== Bi-glyphs ==
J and K use both ASCII symbols on their own, and followed by one or more periods and/or colons. J terminology calls these ''bigraphs'' and ''trigraphs''. For example, J uses <source lang=j inline>^</source> for [[Power]], <source lang=j inline>^.</source> for [[Logarithm]], and <source lang=j inline>^:</source> for the [[Power operator]], while K uses <source lang=k inline>':</source> for the equivalent of [[Windowed_Reduce#Notable_uses|pair-wise reduction]] (<source lang=apl inline>¯2f/</source>) and <source lang=k inline>0:</source> for line-by-line file read/write.
J and K use both ASCII symbols on their own, and followed by one or more periods and/or colons. J terminology calls these ''bigraphs'' and ''trigraphs''. For example, J uses <source lang=j inline>^</source> for [[Power]], <source lang=j inline>^.</source> for [[Logarithm]], and <source lang=j inline>^:</source> for the [[Power operator]], while K uses <source lang=k inline>':</source> for the equivalent of [[Windowed_Reduce#Notable_uses|pair-wise reduction]] (<source lang=apl inline>¯2f/</source>) and <source lang=k inline>0:</source> for line-by-line file read/write. Lately, J has gone beyond this and added <source lang=j inline>{{</source>…<source lang=j inline>}}</source> for explicit functions, similar to the syntax of [[dfns]].
 
[[Dyalog APL]] uses a few bi-glyphs, especially in dops (the operand equivalent of a dfn) where for example <source lang=apl inline>⍺⍺</source> and <source lang=apl inline>⍵⍵</source> denote the left and right [[operand]]s. [[GNU APL]] and [[dzaima/APL]] use <source lang=apl inline>⍶</source> and <source lang=apl inline>⍹</source> instead.
 
[[GNU APL]] also uses bi-glyphs consisting of <source lang=apl inline>⊤</source> follwed by a comparison function as the bit-wise equivalent of the comparison function. For example <source lang=apl inline>A⊤∧B</source> is bit-wise [[And]]. [[Number]]s are treated as 64-bit integers, and [[character]]s as 32-bit integers (with the result being character as well).
 
[[NARS2000]] uses <source lang=apl inline>..</source> for its [[Range]] function.


{{APL features}}
{{APL features}}
{{APL glyphs}}
{{APL glyphs}}
[[Category:Glyphs| ]]
[[Category:Glyphs| ]]

Navigation menu