Cold Help System: Programming: ColdC Reference Manual: Functions: Method: add_method()


LIST add_method(LIST code, SYMBOL name)

This function compiles code (which should be a list of strings) and uses the result as the definition of the method named by the symbol name. If there were errors in compiling, a list of strings describing the errors is returned, otherwise an empty list is returned. Examples:

add_method(["cwrite(\"foo\");"], 'foo)
=> []

add_method(["cwrite(\"foo\")"], 'foo)
=> ["Line 2: parse error"]



add_method() | list_method() | del_method() | find_method() | find_next_method() | method_bytecode() | method_access() | method_flags() | method_info() | methods() | rename_method() | set_method_access() | set_method_flags()


the Cold Dark