| NORSYS SOFTWARE © 2012 | NETICA API | C   VERSION   5.04  |
| int InitNetica2_bn ( | environ_ns* env, char* mesg ) |
This initializes the Netica system. Call it before any other Netica functions except NewNeticaEnviron_ns, GetNeticaVersion_bn, or one of the environment configuration functions, such as ArgumentChecking_ns.
env should point to an environment created by calling NewNeticaEnviron_ns.
mesg should be a pointer to a character array which is allocated at least MESG_LEN_ns characters long. A startup welcome message will be left in mesg if InitNetica2_bn is successful, or an error message if it isn't.
It will return 0 or greater on success, or a negative value on failure. If it fails, then no other Netica API functions should be called with env except CloseNetica_bn. Use the return value to check for an error, rather than the regular Netica error system (e.g., GetError_ns).
Version:
In versions previous to 2.26 this function was named InitNetica_bn and took the address of a pointer to an environ_ns structure instead of just the pointer to the environ_ns.
See also:
| NewNeticaEnviron_ns | Creates the required environ_ns object | |
| CloseNetica_bn | Reverses the effects of InitNetica2_bn |
Example:
int main (void){
char mesg[MESG_LEN_ns];
environ_ns* env;
int res;
env = NewNeticaEnviron_ns (NULL, NULL, NULL); // substitute your
license string for the
first NULL, if desired
res = InitNetica2_bn (env, mesg);
printf ("%s\n", mesg);
if (res < 0) exit (-1);
....
.... [rest of program]
....
res = CloseNetica_bn (env, mesg);
printf ("%s\n", mesg);
exit (res < 0 ? -1: 0);
}