io.cam - a standard i/o CAMILA library
ioReadPipe(com:STR,opt:STR): A-seq
ioAwk2afs(fn:STR,fs:STR):(Atom->Atom)-set
ioAfs2awk(fn:STR,s:(NAT->Atom)-set,fs:STR):SYM
ioTxtPrint(t:txt):SYM
ioTxt2File(fn:STR,t:txt):SYM
ioAfsPrint(s:(Atom->Atom)-set):SYM
ioObjSave(n:SYM,e:ANY):SYM
ioObjLoad(n:SYM):SYM
This library contains a few i/o functions, including reading from UNIX pipes.
This includes output functions for the (A->B)-set functor in ffs.cam to the particular case where both A and B are atomic, that is, A = B = Atom, where Atom = STR | INT | SYM | NAT.
Last Update: 1999.11.11
The informal semantics of the operators are as follows:
ioReadPipe(com,opt)
opens, reads and closes a Unix pipe created by process
``com'', the output of which is passed through the 'any2sexp' (Perl) filter.
See the documentation of 'any2sexp' for the options string you may add
to the command. In many situations str=``'' will do, eg.
ioReadPipe(``ls *.cam'',``'').
ioAwk2afs(fn,fs)
- read ``afs from awk-like file'' - reads file fn which is
supposed to be in awk-like format, where RS = newline and FS = fs
and converts it to an STR-afs.
ioAfs2awk(fn,s,fs)
is the converse of ioAwk2afs(fn,fs),
where s is an NAT->Atom finite mapping set to be stored in file fn
in awk-like format such that FS = fs.
The domain of every entry in s should be an initial segment.
Otherwise, ``holes'' will be filled in by the empty string.
ioTxtPrint(t)
writes txt object t to the standard output.
ioTxt2File(fn,t)
writes txt object t into file fn.
ioAfsPrint(s)
sends afs object to the standard output, after a ffs2txt
conversion.
ioObjSave(n,e)
performs a textual save of any expression 'e' under name 'n'
into file ``n''.
ioObjLoad(n)
loads object 'n' from file ``n'' where it was previously
saved by ioObjSave.
Manual(s)
of txt.cam seq.cam ffs.cam.
J.N. Oliveira (jno@di.uminho.pt), J.J. Almeida (jj@di.uminho.pt)