.\"function added to objects to handle initialization of variables.
.DT
__init
Discworld driver help
__init

Name
.SI 5
__INIT - function added to objects to handle initialization of variables.

.EI
Synopsis
.SI 5
__INIT();

.EI
Description
.SP 5 5

When the driver compiles an object that contains variable declarations that
initialize the variables, then the driver inserts a function named __INIT()
in the compiled object in which the initializations are performed.  For
example, in the following object:

  int x = 3;

  void
  create()
  {
     write(x + "\n");
  }

the driver would translate it into the following internal form before compiling
the object:

  int x;

  __INIT()
  {
     x = 3;
  }

  void
  create()
  {
     write(x + "\n");
  }

If you add a function named __INIT() to one of your objects, then the
driver will call it at object-load-time just as if the driver had inserted
the function on its own.  Be aware that if you do this and the driver needs
to add __INIT in order to initialize variables, then there will be a conflict.
.EP
