External programs / Stand alone programs in pop11/poplog

External programs / Stand alone programs in pop11/poplog

Post by A.Sloma » Wed, 13 Oct 2004 17:38:48

ayn wrote:

Those are two different questions:

The easiest way is to use sysobey. If you are using windows
poplog I have no idea whether that would work or not.

On unix/linux poplog systems


runs the 'who' command showing who is logged in.

It is not advisable from Ved, as the output to the terminal and
Ved's view of the terminal will not necessarily be compatible.

If you ran XVed from the command line in an xterm window, then
the output of who will come out in the xterm window.

Alternatively you can do this in Ved

veddo('sh who');
ENTER sh who

and the output of the who command will come in another ved
buffer, which can be very useful, e.g. with programs like

If you wish to start up another program and not wait for it to
finish, use '&' to run the program in the 'background'.

E.g. in linux/unix this will launch a new xterm window:

sysobey('xterm &')

If you wish to run a program that interacts with your pop11
process things get much more complex. See these help files

HELP pipeutils
HELP pipein
HELP pipeout
HELP run_unix_program

You can also invoke programs written in C or Fortran via the
external procedure interface documented in

HELP external
HELP newc_dec
REF external
REF defstruct
REF external_data

David Young's popvision library uses those mechanisms to invoke
image processing procedures written in C from pop11.

I have never directly used most of that stuff myself, but the
whole of the poplog X window interface (including XVed) depends
on it. See all the documentation in


That's a long and complicated story, which as far as I know
is not well documented for novices. See
HELP popc
REF popc

If anyone who has used these mechanisms would like to donate a tutorial
example to the poplog web site, I am sure that would be much

If I wanted to do it I would do it a different way.

I would try to implement my application as a saved image, just
as much of pop11 (including XVed) is provided as a saved image
in startup.psv which runs on top of basepop11, and prolog
is a saved image prolog.psv, which runs on top of startup.psv
and basepop11. The best way to learn how to make a saved image
is to copy the mechanisms used to create the system
saved images, e.g.


The cost of using the saved image mechanism for a stand-alone
application is that you include a lot of the standard poplog
run time system and there's an overhead in starting up a
core executable + saved image.

However with memory cheap and getting steadily cheaper, and
processors thousands of times faster now than they were a few
years ago and getting steadily faster, I can't see any point
wasting human time to get minor efficiency gains, if your
application is complex enough to benefit from a rich run-time
system like poplog.

If it is not complex enough, then maybe programming in a simpler
language like C or C++ or some other would suffice?

Another approach, which would be more hassle, but could produce a
more compact and efficient stand alone application would use the
mechanisms for rebuilding poplog, as described here

I would copy the popl

1. stand alone executable using pp doesn't stand alone

2. vb.NET stand alone .exe does NOT stand alone

After spending over two weeks updating a vb 6.0 program
to a vb.NET program I found that the .EXE, when run on a
different machine comes up with a "missing mscoree.dll"
error (which is the .NET runtime execution Engine).
Finding the dll and having the package and deployment
wizard install it futhur complicates the issue by having
it fail with a "not able to find the .NET framework
environment" error. Does anybody know how to make a
finished vb.NET .exe truly stand alone and run without

3. Is the stand-alone player TRULY stand ALONE?

4. Can Matlab 6.5 automatically convert GUI-based Matlab program to stand-alone applications?

5. Object-oriented program, stand-alone

6. Compiling Matlab-code to stand-alone program

7. stand alone programs

8. Convert a Program with many functions and GUI into a stand alone .exe

9. Any stand-alone CPU frequency programs?

10. Stand Alone program

11. IE6 as stand alone mail program

12. "Stand-Alone" VB program.

13. Destroying matlab created objects in M-File stand alone program.

14. Stand alone program error!

15. How to remove the black cmd window when a stand-alone Matlab program runs?