Mercurial > hg > octave-max
changeset 2187:755b1cd2e914
[project @ 1996-05-14 03:12:40 by jwe]
author | jwe |
---|---|
date | Tue, 14 May 1996 03:13:39 +0000 |
parents | 0207f7f74be6 |
children | 64dbd9cb5e5a |
files | src/pt-const.cc |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-const.cc +++ b/src/pt-const.cc @@ -124,6 +124,9 @@ // would be returned if prefer_zero_one_indxing were FALSE). static bool Vprefer_zero_one_indexing; +// If TRUE, print the name along with the value. +static bool Vprint_answer_id_name; + // Should operations on empty matrices return empty matrices or an // error? A positive value means yes. A negative value means yes, // but print a warning message. Zero means it should be considered an @@ -320,7 +323,7 @@ { bool pad_after = false; - if (user_pref.print_answer_id_name) + if (Vprint_answer_id_name) { if (print_as_scalar ()) output_buf << name << " = "; @@ -3208,6 +3211,14 @@ } static int +print_answer_id_name (void) +{ + Vprint_answer_id_name = check_preference ("print_answer_id_name"); + + return 0; +} + +static int propagate_empty_matrices (void) { Vpropagate_empty_matrices = check_preference ("propagate_empty_matrices"); @@ -3261,6 +3272,9 @@ DEFVAR (prefer_zero_one_indexing, 0.0, 0, prefer_zero_one_indexing, "when there is a conflict, prefer zero-one style indexing"); + DEFVAR (print_answer_id_name, 1.0, 0, print_answer_id_name, + "set output style to print `var_name = ...'"); + DEFVAR (propagate_empty_matrices, 1.0, 0, propagate_empty_matrices, "operations on empty matrices return an empty matrix, not an error");