Respond to an unknown method call: Difference between revisions
Content added Content deleted
m (→{{header|Tcl}}: oops) |
(Add Brat solution) |
||
Line 3:
This task is intended only for object systems that use a dynamic dispatch mechanism without static checking.
=={{header|Brat}}==
<lang brat>example = object.new
example.no_method = { meth_name, *args |
p "#{meth_name} was called with these arguments: #{args}"
}
example.this_does_not_exist "at all" #Prints "this_does_not_exist was called with these arguments: [at all]"</lang>
=={{header|C sharp|C#}}==
{{works with|C sharp|4.0}}
|