02.10.2012 Views

Using the Windows Interface

Using the Windows Interface

Using the Windows Interface

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GAUSS User Guide<br />

21.1 Writing FLI Functions<br />

Your FLI functions should be written to <strong>the</strong> following specifications:<br />

1. Take 0 or more pointers to doubles as arguments.<br />

This does not mean you cannot pass strings to an FLI function. Just recast <strong>the</strong> double<br />

pointer to a char pointer inside <strong>the</strong> function.<br />

2. Take those arguments ei<strong>the</strong>r in a list or a vector.<br />

3. Return an integer.<br />

In C syntax, <strong>the</strong>n, your functions would take one of <strong>the</strong> following forms:<br />

1. int func(void);<br />

2. int func(double *arg1 [[,double *arg2,. . .]]);<br />

3. int func(double *arg[]);<br />

Functions can be written to take a list of up to 100 arguments, or a vector (in C terms, a<br />

1-dimensional array) of up to 1000 arguments. This does not affect how <strong>the</strong> function is called from<br />

GAUSS; <strong>the</strong> dllcall statement will always appear to pass <strong>the</strong> arguments in a list. That is, <strong>the</strong><br />

dllcall statement will always look as follows:<br />

dllcall func(a,b,c,d[[,e...]]);<br />

For details on calling your function, passing arguments to it, getting data back, and what <strong>the</strong> return<br />

value means, see dllcall in <strong>the</strong> GAUSS Language Reference.<br />

21-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!