Mercurial > octave-nkf
diff libinterp/octave-value/ov.h @ 19428:b39cbe9f3bb0
allow ranges to be disabled
* ov.cc, ov.h: Allow creation of range object to be disabled.
Also allow range objects to be forced, even when generally disabled.
* pt-exp.h (tree_expression::for_cmd_expr): New member variable.
(tree_expression::mark_as_for_cmd_expr,
tree_expression::is_for_cmd_expr): New functions.
* oct-parse.in.yy: Mark for command expressions.
* pt-colon.cc (tree_colon_expression::make_range): Force creation of
range if expression is a for command expression.
* basics.txi, numbers.txi: Document changes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 08 Dec 2014 12:59:47 -0500 |
parents | fa48651fbb8a |
children | 76478d2da117 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h Mon Dec 08 10:18:35 2014 -0500 +++ b/libinterp/octave-value/ov.h Mon Dec 08 12:59:47 2014 -0500 @@ -281,7 +281,7 @@ octave_value (const Array<std::string>& cellstr); octave_value (const idx_vector& idx, bool lazy = true); octave_value (double base, double limit, double inc); - octave_value (const Range& r); + octave_value (const Range& r, bool force_range = false); octave_value (const octave_map& m); octave_value (const octave_scalar_map& m); octave_value (const octave_map& m, const std::string& id,