procedure compile
Converts a dpuser-script into C-code, compiles it and links it at runtime into the running dpuser-session. Unlike with user defined functions or procedures, it is not allowed to compile a function with the same name as aalready compiled procedure and vice versa.
Syntax
compile "filename"
Arguments
filename: | The filename of the dpuser-script to convert |
Switches
/c: | Adds needed headers and forward declarations to existing C-code and links it on runtime. The general data type to use must be 'dpuserType'. Functions and procedures must begin like shown in the examples below. |
/reset: | Unloads all compiled functions and procedures. See example below. |
Examples
To compile c-code, functions must be defined as follows:
extern "C" dpuserType funcName(dpuserType &a, ...) { ... }
...;
return funcName;
}
Procedures must be defined as follows:
extern "C" void procName(dpuserType &a, ...) {
...;
return;
}
To unload all functions and procedures:
compile "", /reset