v1.2.112 - kfun - compile_object

NAME

compile_object - compile an object

SYNOPSIS

object compile_object(string file, varargs string source)

DESCRIPTION

Compile an object from a LPC file, specified by the first argument with ".c" appended. If the optional source argument is supplied, the object is compiled from that string, instead. The returned object will have the file string as name. If the object to be compiled already exists and is not inherited by any other object, it and all of its clones will be upgraded to the new version. Variables will be preserved only if they also exist in the new version and have the same type; new variables will be initialized to 0. The actual upgrading is done immediately upon completion of the current thread.

ERRORS

Compilation errors will be reported to the driver object. Furthermore, a failure to compile will result in a runtime error, as well.

SEE ALSO

kfun/clone_object, kfun/destruct_object, kfun/new_object, kfun/object_name