#include #include #include /* Example worker using a string */ static int worker( double *d_ptr, char *string ) { /* My first value is the double passed in from GAUSS */ double first = *d_ptr; /* My second value is expected to be "sin" for sine, or "cos" for cosine */ if( strcasecmp( string, "sin" ) == 0 ) { /* Replace my first value with its sine */ *d_ptr = sin( first ); } else if( strcasecmp( string, "cos" ) == 0 ) { /* Replace my first value with its cosine */ *d_ptr = cos( first ); } else { /* Replace the string with the word "error" to clue the GAUSS program in */ string = "error"; } } /* exported wrapper, all double * arguments, calls the real ** function with whatever data types it expects */ int caller(double *x, double *y) { return worker(x,(char *)y); }