Format

From APL Wiki
Jump to navigation Jump to search

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
APL built-ins [edit]
Primitive functions
Scalar
Monadic ConjugateNegateSignumNotRollType
Dyadic AddSubtractEqual to (Xnor) ∙ Not Equal to (Xor) ∙ MinimumMaximumComparison functions
Non-Scalar
Structural ShapeReshapeTallyDepthRavelReverseRazeMixCut (K)PairReplicatePartitioned Enclose
Selection TakeDropUniqueIdentitySelect
Selector Interval IndexIndices
Computational MatchNot MatchNub SieveFormatExecute
Primitive operators Monadic EachReplicate
Dyadic Reverse Compose
Quad names
Arrays Index originMigration level
Functions
Operators
Other ZildeHigh minusFunction axis