Format: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "{{APL built-ins}}" to "{{APL built-ins}}Category:Primitive functions") |
mNo edit summary |
||
Line 3: | Line 3: | ||
== Examples == | == Examples == | ||
Format in its [[monadic]] form, allows the user to convert [[ | 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): | ||
<source lang=apl> | <source lang=apl> | ||
supper ← 10 | supper ← 10 |
Revision as of 08:58, 13 May 2020
⍕
|
Format (⍕
) is a primitive function.
Examples
Format in its monadic form, allows the user to convert arrays of any type into simple character arrays (for example for concatenation with other character arrays):
supper ← 10 'I ate ',(⍕supper),' shrimp.' I ate 10 shrimp.
It is very powerful when combined with Execute, allowing the user to construct APL code:
data ← 7 ⍎'6 × ',⍕data 42