| Extracted from Pike v7.8 release 700 at 2013-06-08.

[Top]

# Method add_constant()

Method add_constant

  `void add_constant(string name, mixed value)`
  `void add_constant(string name)`

Description

  Add a new predefined constant.

  This function is often used to add builtin functions. All programs compiled after the add_constant() function has been called can access value by the name name .

  If there is a constant called name already, it will be replaced by by the new definition. This will not affect already compiled programs.

  Calling add_constant() without a value will remove that name from the list of constants. As with replacing, this will not affect already compiled programs.

See also

  all_constants()