comparison test/colon-op/colon_op.m @ 28519:d4563c5d4060

handle all dispatching for colon operator in do_colon_op function * ov.cc (do_colon_op): Handle all dispatching here, but using lookup based on argument vector passed to feval instead of determining dispatch type separately. * pt-colon.cc (tree_colon_expression::evaluate): Simply evaluate arguments and pass them to do_colon_op. * test/colon-op: New test directory. * test/module.mk: Update.
author John W. Eaton <jwe@octave.org>
date Mon, 29 Jun 2020 23:45:19 -0400
parents
children b73a54c31152
comparison
equal deleted inserted replaced
28518:b8ab8b58547d 28519:d4563c5d4060
1 classdef colon_op
2 methods
3 function r = colon (a, b, c)
4 if (nargin == 2)
5 r = sprintf ("%s:%s", class (a), class (b));
6 else
7 r = sprintf ("%s:%s:%s", class (a), class (b), class (c));
8 end
9 end
10 end
11 end