Generate from result functions

Top  Previous  Next

/* Generate from result functions */

/ * =================================*/

#include "moskito.h"/* is everything in it */

#include <string.h>

 

/*

The following routine shows how results zurueckgeliefert become.

As results integers and sign chains zurueckgeliefert are able

become. To be able to return sign chains, the sign chain has to go after

(long int) gecastet become.

*/

long int to EXPORTENTRY Ergebnis_liefern (int argc, char* argv [])

{

char strBsp [] = "example text";

int iBsp = in 4711;

 

//Example shows how sign chains are returned.

if (SYShasSwitch (argc, argv, "TEXT")) {

char *ret;

if (! strBsp)

return ZERO;

ret = Malloc (strlen (strBsp) +1);

if (! ret)

return 0;

strcpy (ret, strBsp);

return (long) ret;

} //if

 

//Example shows a normal return.

if (SYShasSwitch (argc, argv, "DIGIT")) {

return iBsp;

} //if

 

//Result 0 should show that the routine ran properly.

return 0;

} //Ergebnis_liefern

/*---------------------------------------------------------------------------*/