annotate test/colon-op/@legacy_colon_op/colon.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28519
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 function r = colon (a, b, c)
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 if (nargin == 2)
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 r = sprintf ("%s:%s", class (a), class (b));
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 else
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 r = sprintf ("%s:%s:%s", class (a), class (b), class (c));
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 end
d4563c5d4060 handle all dispatching for colon operator in do_colon_op function
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 end