next up previous contents
Next: example_go() Up: Writing the Required Routines Previous: Writing the Required Routines   Contents

example_init()

The init routine is called when a new dynamical system is loaded. It is not passed any parameters and may return an integer, however any value it returns will be ignored. This routine is generally useful for initializing data structures whose size is dependent on the dynamical system. The following code is an example which does nothing except print a message that the routine was called.

 
#include <stdio.h>    /* include stdio.h declarations for stdout */

/*
 * example_init()
 *
 * example routines initialization
 * called whenever a new dynamical system is loaded
 */ 
int 
example_init() 
{
  fprintf(stdout, "EXAMPLE routines initialized.\n"); 
}



root
1998-11-02