Product Site

5.1.3.2. newFile (Class Method)

Returns a new instance of the Method class, which is an executable representation of the code contained in the file filename. Raises an error if the file filename cannot be read. The filename is a string.

The context allows the created method 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 method will inherit the class and routine search scope from the caller of the newFile method.