Mercurial > hg > octave-nkf
diff src/syl.cc @ 95:e7c8e76a3224
[project @ 1993-09-13 02:47:37 by jwe]
(syl): Call vector_of_empties() instead of empty_tree().
author | jwe |
---|---|
date | Mon, 13 Sep 1993 02:47:37 +0000 |
parents | ef73939dc2c5 |
children | 197bd6c63baa |
line wrap: on
line diff
--- a/src/syl.cc +++ b/src/syl.cc @@ -50,34 +50,6 @@ long, long); } -// Local function: construct return vector of empty matrices. Return -// empty matrices and/or gripe when appropriate. Probably should make -// this available elsewhere, since tc-xxx functions do this a lot. - -tree_constant * -empty_tree (int nargout, char* fcn_name) -{ - tree_constant *retval = NULL_TREE_CONST; - -// Got an empty argument, check if should gripe/return empty values. - - int flag = user_pref.propagate_empty_matrices; - if (flag != 0) - { - if (flag < 0) - gripe_empty_arg (fcn_name, 0); - - Matrix m; - retval = new tree_constant [nargout+1]; - for (int i = 0; i < nargout; i++) - retval[i] = tree_constant (m); - } - else - gripe_empty_arg (fcn_name, 1); - - return retval; -} - // Return value of tree_constant argument as ComplexMatrix. ComplexMatrix @@ -134,7 +106,7 @@ tree_constant argc = args[3].make_numeric (); if (arga.is_empty () || argb.is_empty () || argc.is_empty ()) - retval = empty_tree (nargout, "syl"); + retval = vector_of_empties (nargout, "syl"); else {