> < ^ Date: Fri, 22 Oct 1993 17:22:08 +0100
> < ^ From: Alexander Hulpke <hulpke@math.colostate.edu >
< ^ Subject: Re: Exec'ing from within GAP

Dear Forum,

In his letter, Eric Rossin asked:

I would like to "Exec" a command (under Unix), and somehow get
the result of the command back into GAP. E.g., say the result
of the GAP comand

Exec("prog < file");

returned a number, or even a list of numbers.

currently, there is no automatical mechanism for getting Exec results.
Your external program has to create a file like:

RESULT:=[1,2,3,4,5];

which will be read in by GAP by using 'Read'. the result can be obtained
from the global variable RESULT afterwards.

-- Alexander Hulpke, Lehrstuhl D f"ur |Ce po`eme est, en effet, divis'e en
   Mathematik, RWTH Aachen            |cinq strophes successivement et respec-
                                      |tivement compos'ees de 3-1-4-1-5 vers,
  ahulpke@math.rwth-aachen.de         |   Jacques Bens:  Le sonnet irrationnel

> < [top]