APLX Help : Help on APL language : APL Primitives : ⍕ Format
|
|
|
|
|
One-argument form See also two-argument forms Format by specification, Format by example
QTY ← 1760 2
⍴ QTY (Asks the size of the data in QTY.
2 Answer is 2 numbers.)
QTY ← ⍕ QTY (Formats data in QTY.)
⍴ QTY (Asks the size of the data in QTY.
6 Answer is now 6 characters.)
'PRICE IS ',⍕22×1.15 (The numeric data is formatted and joins the
PRICE IS 25.3 character data to form a simple character
vector)
DATA←(⍳3) (2 2⍴⍳4) 'TEXT' 100
DATA
1 2 3 1 2 TEXT 100
3 4
⍴DATA
4
DATA←⍕DATA (Format preserves the appearance of an
DATA array, but makes it into a simple
1 2 3 1 2 TEXT 100 character array)
3 4
⍴DATA
2 24
|
|
APLX Help : Help on APL language : APL Primitives : ⍕ Format
|
|
Copyright © 1996-2010 MicroAPL Ltd