Method compile()
- Method
compile
programcompile(stringsource,CompilationHandler|voidhandler,int|voidmajor,int|voidminor,program|voidtarget,object|voidplaceholder)- Description
Compile a string to a program.
This function takes a piece of Pike code as a string and compiles it into a clonable program.
The optional argument
handleris used to specify an alternative error handler. If it is not specified the current master object will be used.The optional arguments
majorandminorare used to tell the compiler to attempt to be compatible with Pikemajor.minor.- Note
Note that
sourcemust contain the complete source for a program. It is not possible to compile a single expression or statement.Also note that compile() does not preprocess the program. To preprocess the program you can use compile_string() or call the preprocessor manually by calling cpp().
- See also
compile_string(), compile_file(), cpp(), master(), CompilationHandler, DefaultCompilerEnvironment