Format: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
m (Text replacement - "{{APL built-ins}}" to "{{APL built-ins}}Category:Primitive functions")
Line 15: Line 15:
42
42
</source>
</source>
{{APL built-ins}}
{{APL built-ins}}[[Category:Primitive functions]]

Revision as of 13:44, 30 April 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
APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)
Quad names Index originComparison toleranceMigration levelAtomic vector