>
<pre class="example">(%i1) load(&quot;stringproc&quot;)$
(%i2) s: openw(&quot;E:/file.txt&quot;);
(%o2)                     #&lt;output stream E:/file.txt&gt;
(%i3) control: 
&quot;~2tAn atom: ~20t~a~%~2tand a list: ~20t~{~r ~}~%~2tand an integer: ~20t~d~%&quot;$
(%i4) printf( s,control, 'true,[1,2,3],42 )$
(%o4)                                false
(%i5) close(s);
(%o5)                                true
(%i6) s: openr(&quot;E:/file.txt&quot;);
(%o6)                     #&lt;input stream E:/file.txt&gt;