[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
stig@ii.uib.no (Stig Erik Sandoe) writes:
> Date: 14 Nov 1999 23:50:33 GMT
>
> hi,
>
> I asked at comp.lang.pop some time ago whether it was possible to
> execute an external program from Poplog and most specifically from
> the Common Lisp part but I don't think I got a reply. Is this
> possible?
(Almost) Anything you can do in Pop-11 you can do in Poplog Common lisp
with appropriate syntax. The Pop-11 sysobey command takes a string and
runs it as a shell command, so you can do
(pop11::sysobey "who")
to find out who is logged in
(pop11::sysobey "ls -l")
to get a directory listing.
For more on SYSOBEY give the REF SYSOBEY command in the editor,
or look at the file $usepop/pop/ref/sysutil
There are additional Pop-11 library facilities accessible via lisp,
e.g. pipein, pipeout, and run_unix_program, useful when you want a
program to communicate with a unix program, e.g. sending it input
or reading output from it, unlike sysobey which simply runs a
complete shell command and prints any output to the terminal: not so
good if you want the output to go into an editor buffer.
There are also facilities for invoking external procedures (e.g.
defined in C, Fortran, etc.) and the lisp interface for this is in
the lisp HELP EXTERNAL file, also readable as
$usepop/pop/lisp/help/external
I am not a lisp user. Maybe someone else will provide more detailed
information.
It is probably a good idea to find your way around the files in
$usepop/pop/lisp/help/
$usepop/pop/lisp/ref/
You may also find some of the Pop-11 REF files useful, in
$usepop/pop/ref/
E.g. system, external, external_data, and many more.
If you start trying to use the X window interface look at files in
$usepop/pop/x/pop/ref/
$usepop/pop/x/pop/help/
They describe facilities geared to Pop-11, but accessible from
Poplog common lisp.
Aaron
--
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (NB: Anti Spam address)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
|