5c8e891995-10-29Fredrik Hübinette (Hubbe) NAME add_efun - add new predefined functions or constants SYNTAX void add_efun(string name, mixed value); or void add_efun(string name); DESCRIPTION This function adds a new constant to uLPC, it is often used to add builin functions (efuns). All programs compiled after add_efun function is called can access 'value' by the name given by 'name'. If there is an efun called 'name' already, it will be replaced by by the new definition. This will not affect already compiled programs. Calling add_efun without a value will remove that name from the list of of efuns. As with replacing, this will not affect already compiled programs. EXAMPLES add_efun("true",1); add_efun("false",0); add_efun("PI",4.0); add_efun("sqr",lambda(mixed x) { return x * x; }); add_efun("add_efun"); SEE ALSO all_efuns