Format: Difference between revisions

Jump to navigation Jump to search
36 bytes added ,  21:02, 10 September 2022
m
Text replacement - "</source>" to "</syntaxhighlight>"
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 5: Line 5:
=== Monadic form ===
=== Monadic form ===


Format in its [[monadic]] form allows the user to convert [[Array model|arrays]] of any [[type]] into simple character arrays (for example for concatenation with other character arrays). The result usually matches the interpreter's default display, either by <syntaxhighlight lang=apl inline>⎕←</source> or by REPL.
Format in its [[monadic]] form allows the user to convert [[Array model|arrays]] of any [[type]] into simple character arrays (for example for concatenation with other character arrays). The result usually matches the interpreter's default display, either by <syntaxhighlight lang=apl inline>⎕←</syntaxhighlight> or by REPL.


<syntaxhighlight lang=apl>
<syntaxhighlight lang=apl>
Line 20: Line 20:
       (⍴DATA) (⍴⍕DATA)
       (⍴DATA) (⍴⍕DATA)
  4  2 22
  4  2 22
</source>
</syntaxhighlight>


=== Dyadic form ===
=== Dyadic form ===
Line 40: Line 40:
       ⍴(12 2⍕C)
       ⍴(12 2⍕C)
2 36
2 36
</source>{{Works in|[[Dyalog APL]], [[NARS2000]]}}
</syntaxhighlight>{{Works in|[[Dyalog APL]], [[NARS2000]]}}


[[APLX]] supports '''Format by example''', which uses string left argument for a rich set of format specifications:
[[APLX]] supports '''Format by example''', which uses string left argument for a rich set of format specifications:
Line 51: Line 51:
       '555,555,555.55'⍕1234567.89
       '555,555,555.55'⍕1234567.89
   1,234,567.89
   1,234,567.89
</source>{{Works in|[[APLX]]}}
</syntaxhighlight>{{Works in|[[APLX]]}}


== See also ==
== See also ==

Navigation menu