diff libinterp/corefcn/bitfcns.cc @ 20711:7b608fadc663

Make error messages more specific about the variable and problem encountered. * besselj.cc, bitfcns.cc, colloc.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, dirfns.cc, ellipj.cc, error.cc, gl-render.cc, graphics.cc, graphics.in.h, load-path.cc, lsode.cc, lu.cc, luinc.cc, oct-hist.cc, oct-obj.cc, octave-link.cc, quad.cc, rand.cc, symtab.cc, sysdep.cc, toplev.cc, utils.cc, variables.cc, __init_fltk__.cc, chol.cc, fftw.cc, ov-cell.cc, ov-ch-mat.cc, ov-class.cc, ov-classdef.cc, ov-cx-mat.cc, ov-fcn-inline.cc, ov-struct.cc, ov-usr-fcn.cc, CMatrix.cc, dMatrix.cc, fCMatrix.cc, fMatrix.cc, lo-specfun.cc, curl.m, divergence.m, __fltk_file_filter__.m, __uiobject_split_args__.m, uigetfile.m, doc.m, imshow.m, rref.m, subspace.m, edit.m, fileattrib.m, open.m, substruct.m, annotation.m, axis.m, caxis.m, datetick.m, hidden.m, legend.m, whitebg.m, colorbar.m, __add_datasource__.m, __ezplot__.m, __pie__.m, __plt_get_axis_arg__.m, pan.m, __print_parse_opts__.m, rotate3d.m, subplot.m, zoom.m, compan.m, addpref.m, getpref.m, setpref.m, powerset.m, bicg.m, bicgstab.m, cgs.m, qmr.m, spaugment.m, pascal.m, moment.m, cstrcat.m, system.tst: Make error messages more specific about the variable and problem encountered.
author Rik <rik@octave.org>
date Wed, 18 Nov 2015 10:40:26 -0800
parents 571508c1ed06
children f7084eae3318
line wrap: on
line diff
--- a/libinterp/corefcn/bitfcns.cc	Tue Nov 17 22:04:42 2015 +0100
+++ b/libinterp/corefcn/bitfcns.cc	Wed Nov 18 10:40:26 2015 -0800
@@ -502,7 +502,7 @@
         error ("bitshift: size of A and N must match, or one operand must be a scalar"); \
     } \
   else \
-    error ("bitshift: expecting integer as second argument"); \
+    error ("bitshift: K must be a scalar or array of integers"); \
 
 #define DO_UBITSHIFT(T, N) \
   do \
@@ -574,7 +574,7 @@
     {
       int nbits = 64;
 
-      NDArray n = args(1).xarray_value ("bitshift: expecting integer as second argument");
+      NDArray n = args(1).xarray_value ("bitshift: K must be a scalar or array of integers");
 
       if (nargin == 3)
         {
@@ -657,7 +657,7 @@
 %!assert (bitshift (uint64 (16), 4), uint64 (256))
 %!assert (bitshift (uint8 (255), 1), uint8 (254))
 
-%!error <expecting integer as second argument> bitshift (16, 1.5)
+%!error <K must be a scalar or array of integers> bitshift (16, 1.5)
 %!error bitshift (16, {1})
 %!error <N must be a scalar integer> bitshift (10, [-2 -1 0 1 2], [1 1 1 1 1])
 %!error <N must be positive> bitshift (10, [-2 -1 0 1 2], -1)