/
ColdCore-3.0a9.02/
ColdCore-3.0a9.02/src/
new object $help_coldc_mcall: $help_coldc_expr;

var $has_name name = ['prop, "Method Call Expression", "Method Call Expression"];
var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Methods defined on an object can be executed with the ", <$format, ["i", [], ["method-call expression"], 'do_i]>, ", which has the following syntax:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["receiver"], 'do_i]>, ".", <$format, ["i", [], ["method"], 'do_i]>, "(", <$format, ["i", [], ["arg1"], 'do_i]>, ", ", <$format, ["i", [], ["arg2"], 'do_i]>, ", ", <$format, ["i", [], ["..."], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "In this example ", <$format, ["i", [], ["receiver"], 'do_i]>, " is the object where ", <$format, ["i", [], ["method"], 'do_i]>, " may be called, and ", <$format, ["i", [], ["arg1"], 'do_i]>, ", ", <$format, ["i", [], ["arg2"], 'do_i]>, " are expressions. There are is no limit to the number of arguments sent, although even if there are no arguments the parenthesis must exist. Arguments are evaluated from left to right. ", <$format, ["np", [], [], 'do_np]>, "The ", <$format, ["i", [], ["receiver"], 'do_i]>, " may be omitted, in which case it is assumed to be the current object. If ", <$format, ["i", [], ["receiver"], 'do_i]>, " does not exist in the database, the error ", <$format, ["tt", [], ["~objnf"], 'do_tt]>, " is thrown. ", <$format, ["np", [], [], 'do_np]>, "Any ColdC Data (with the exception of Frobs) may be used in place of the object as the ", <$format, ["i", [], ["receiver"], 'do_i]>, ". If a method is called in this manner, the interpreter will lookup an object with an object name that is the same as the type of data being used (such as an object named ", <$format, ["tt", [], ["$string"], 'do_tt]>, " if the data is a ", <$format, ["tt", [], ["'string"], 'do_tt]>, "). If an object is found in the database with this name, the method is called on that object and the data is sent as the first argument (subsequent arguments will still be sent). If not, the error ", <$format, ["tt", [], ["~objnf"], 'do_tt]>, " is thrown. ", <$format, ["np", [], [], 'do_np]>, "If a Frob is used in place of ", <$format, ["i", [], ["receiver"], 'do_i]>, ", the class object for the frob becomes the ", <$format, ["i", [], ["receiver"], 'do_i]>, " and the representation of the frob is sent as the first argument. Because of this difference it is possible to have a special method that only a frob may call. For more information on frobbed methods see ", <$format, ["link", [["node", "$help_coldc_methods"]], ["Defining Methods"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, <$format, ["i", [], ["method"], 'do_i]>, " must be either the name of the method, or an expression which results in a symbol for the name of the method. If ", <$format, ["i", [], ["method"], 'do_i]>, " cannot be found on ", <$format, ["i", [], ["receiver"], 'do_i]>, " or any of ", <$format, ["i", [], ["receiver"], 'do_i]>, "'s ancestors, then the error ", <$format, ["tt", [], ["~methodnf"], 'do_tt]>, " is thrown. ", <$format, ["np", [], [], 'do_np]>, "The result from a method-call expression is the value returned by the method. If the method does not return a value, the result is ", <$format, ["i", [], ["receiver"], 'do_i]>, ". If ", <$format, ["i", [], ["receiver"], 'do_i]>, " is a frob, then the method is called on the frob's class object, with the frob's representation inserted as the first argument (other arguments are placed after the representation). ", <$format, ["np", [], [], 'do_np]>, "Here are some examples of method-call expressions:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [".tell(\"I don't see that here.\");", <$format, ["br", [], [], 'do_br]>, "=> $brandon"], 'do_dfn]>, " ", <$format, ["dfn", [], ["$sys.admins();", <$format, ["br", [], [], 'do_br]>, "=> [$lynx, $dancer, $jenner]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["([1, 2, 3]).reverse()", <$format, ["br", [], [], 'do_br]>, "=> [3, 2, 1]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["$parser.(tosym(what + \"_mesg\"))(messages)", <$format, ["br", [], [], 'do_br]>, "=> $parser"], 'do_dfn]>, " ", <$format, ["dfn", [], ["(<$thing_frob, #[['myname, \"coins\"], ['amount, 300]]>).name()", <$format, ["br", [], [], 'do_br]>, "=> \"300 coins\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "In order to prevent incidents of infinite recursion, there is a maximum calling depth for methods. If calling a method would exceed the maximum calling depth, the error ", <$format, ["tt", [], ["~maxdepth"], 'do_tt]>, " is thrown. ", <$format, ["np", [], [], 'do_np]>, "If a method is overridden it is still possible for it to be called. For more information see the section ", <$format, ["link", [["node", "$help_coldc_mcall_over"]], ["Calling Overridden Methods"], 'do_link]>, "."], #[['this, $help_coldc_mcall]]]>;
var $help_node index = $help_index_driver;
var $help_node links = #[["Defining Methods", $help_coldc_methods], ["Calling Overridden Methods", $help_coldc_mcall_over]];
var $help_node nolist = 0;
var $root created_on = 854057972;
var $root flags = ['variables, 'methods, 'code, 'core];
var $root inited = 1;
var $root managed = [$help_coldc_mcall];
var $root manager = $help_coldc_mcall;