Initialize the interpreter
int SLang_init_slang (void)
The SLang_init_slang function must be called by all
applications that use the S-Lang interpreter. It initializes the
interpreter, defines the built-in data types, and adds a set of core
intrinsic functions.
The function returns 0 upon success, or -1 upon failure.
SLang_init_slfile, SLang_init_slmath, SLang_init_slunix
Initialize the interpreter file I/O intrinsics
int SLang_init_slfile (void)
This function initializes the interpreters file I/O intrinsic
functions. This function adds intrinsic functions such as
fopen, fclose, and fputs to the interpreter.
It returns 0 if successful, or -1 upon error.
Before this function can be called, it is first necessary to call
SLang_init_slang. It also adds
the preprocessor symbol __SLFILE__ to the interpreter.
SLang_init_slang, SLang_init_slunix, SLang_init_slmath
Initialize the interpreter math intrinsics
int SLang_init_slmath (void)
The SLang_init_slmath function initializes the interpreter's
mathematical intrinsic functions and makes them available to the
language. The intrinsic functions include sin, cos,
tan, etc... It returns 0 if successful, or -1
upon failure.
This function must be called after SLang_init_slang. It adds
the preprocessor symbol __SLMATH__ to the interpreter.
SLang_init_slang, SLang_init_slfile, SLang_init_slunix
Make available some unix system calls to the interpreter
int SLang_init_slunix (void)
The SLang_init_slunix function initializes the interpreter's
unix system call intrinsic functions and makes them available to the
language. Examples of functions made available by
SLang_init_slunix include chmod, chown, and
stat_file. It returns 0 if successful, or -1
upon failure.
This function must be called after SLang_init_slang. It adds
the preprocessor symbol __SLUNIX__ to the interpreter.
SLang_init_slang, SLang_init_slfile, SLang_init_slmath