Product Site

5.1.6.1. new (Class Method)

Returns a new instance of the Routine class, which is an executable representation of the code contained in the source. The name is a string. The source can be a single string or an array of strings containing individual method lines.

The context allows the created routine to inherit class and routine lookup scope from another source. If specified, context can be a Method object, a Routine object, a Package object, or the string "PROGRAMSCOPE". PROGRAMSCOPE is the default, and specifies that the newly created routine will inherit the class and routine search scope from the caller of the new method.