
Appendix A4
Using OxGauss
A4.1 Introduction
Ox has the capability of running a wide range of Gauss
1
programs. Gauss code can be
called from Ox programs, or run on its own. The formal syntax of OxGauss is described
in Chapter A6. Section A4.7 lists some of the limitations of OxGauss. The remainder
of this chapter gives some examples on its use.
A4.2 Running OxGauss programs from the command
line
As an example we consider a small project, consisting of a code file that contains a
procedure and an external variable, together with a code file that includes the former and
calls the function. We shall always use the .src extension for the OxGauss programs.
..................................................samples/oxgauss/gaussfunc.src
declare matrix _g_base = 1;
proc(0)=gaussfunc(a,b);
"calling gaussfunc";
retp(a+_g_base*eye(b));
endp;
.......................................................................................
...................................................samples/oxgauss/gausscall.src
#include gaussfunc.src;
_g_base = 20;
z = gaussfunc(10,2);
"result from gaussfunc" z;
.......................................................................................
To run this program on the command line, enter
oxl -g gausscall.src
1
GAUSS is a trademark of Aptech Systems, Inc., Maple Valley, WA, USA
100
Komentarze do niniejszej Instrukcji