Anonymous user
Write float arrays to a text file: Difference between revisions
Write float arrays to a text file (view source)
Revision as of 12:20, 25 December 2020
, 3 years ago→{{header|Sidef}}
(Added Wren) |
|||
Line 1,581:
1e+11 3.1623e+05
</pre>
=={{header|Smalltalk}}==
{{works with | Smalltalk/X}}
<lang smalltalk>x := #( 1 2 3 1e11 ).
y := x collect:#sqrt.
xprecision := 3.
yprecision := 5.
'sqrt.dat'asFilename writingFileDo:[:fileStream |
x with:y do:[:xI :yI |
'%.*g\t%.*g\n' printf:{ xprecision . xI . yprecision . yI } on:fileStream
]
]</lang>.
=={{header|SPL}}==
|