2376
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
2376
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_value_h) |
|
24 #define octave_value_h 1 |
|
25 |
|
26 #if defined (__GNUG__) |
|
27 #pragma interface |
|
28 #endif |
|
29 |
|
30 #include <cstdlib> |
|
31 |
|
32 #include <string> |
|
33 |
|
34 class ostream; |
|
35 |
|
36 #include "Range.h" |
|
37 #include "idx-vector.h" |
|
38 #include "mx-base.h" |
2477
|
39 #include "oct-alloc.h" |
2942
|
40 #include "str-vec.h" |
|
41 |
2376
|
42 class Octave_map; |
2903
|
43 class octave_stream; |
2974
|
44 class octave_function; |
2376
|
45 class octave_value_list; |
2979
|
46 class octave_lvalue; |
2376
|
47 |
|
48 // Constants. |
|
49 |
|
50 // This just provides a way to avoid infinite recursion when building |
|
51 // octave_value objects. |
|
52 |
|
53 class |
|
54 octave_xvalue |
|
55 { |
|
56 public: |
|
57 |
|
58 octave_xvalue (void) { } |
|
59 }; |
|
60 |
2427
|
61 class octave_value; |
|
62 |
|
63 // XXX FIXME XXX -- these should probably really be inside the scope |
|
64 // of the octave_value class, but the cygwin32 beta16 version of g++ |
3203
|
65 // can't handle that. |
|
66 |
|
67 typedef octave_value (*unary_op_fcn) |
|
68 (const octave_value&); |
|
69 |
|
70 typedef void (*non_const_unary_op_fcn) |
|
71 (octave_value&); |
2427
|
72 |
|
73 typedef octave_value (*binary_op_fcn) |
|
74 (const octave_value&, const octave_value&); |
|
75 |
|
76 typedef octave_value (*assign_op_fcn) |
|
77 (octave_value&, const octave_value_list&, const octave_value&); |
|
78 |
|
79 typedef octave_value * (*type_conv_fcn) (const octave_value&); |
|
80 |
2376
|
81 class |
2974
|
82 octave_value |
2376
|
83 { |
|
84 public: |
|
85 |
3203
|
86 enum unary_op |
|
87 { |
|
88 not, |
|
89 uminus, |
|
90 transpose, |
|
91 hermitian, |
|
92 incr, |
|
93 decr, |
|
94 num_unary_ops, |
|
95 unknown_unary_op |
|
96 }; |
|
97 |
2376
|
98 enum binary_op |
|
99 { |
|
100 add, |
|
101 sub, |
|
102 mul, |
|
103 div, |
|
104 pow, |
|
105 ldiv, |
2903
|
106 lshift, |
|
107 rshift, |
2376
|
108 lt, |
|
109 le, |
|
110 eq, |
|
111 ge, |
|
112 gt, |
|
113 ne, |
|
114 el_mul, |
|
115 el_div, |
|
116 el_pow, |
|
117 el_ldiv, |
|
118 el_and, |
|
119 el_or, |
|
120 struct_ref, |
|
121 num_binary_ops, |
|
122 unknown_binary_op |
|
123 }; |
|
124 |
2880
|
125 enum assign_op |
|
126 { |
|
127 asn_eq, |
|
128 add_eq, |
|
129 sub_eq, |
|
130 mul_eq, |
|
131 div_eq, |
3204
|
132 ldiv_eq, |
2903
|
133 lshift_eq, |
|
134 rshift_eq, |
2880
|
135 el_mul_eq, |
|
136 el_div_eq, |
3204
|
137 el_ldiv_eq, |
2880
|
138 el_and_eq, |
|
139 el_or_eq, |
|
140 num_assign_ops, |
|
141 unknown_assign_op |
|
142 }; |
|
143 |
3203
|
144 static string unary_op_as_string (unary_op); |
|
145 |
2376
|
146 static string binary_op_as_string (binary_op); |
|
147 |
2880
|
148 static string assign_op_as_string (assign_op); |
|
149 |
2376
|
150 enum magic_colon { magic_colon_t }; |
|
151 enum all_va_args { all_va_args_t }; |
|
152 |
|
153 octave_value (void); |
|
154 octave_value (double d); |
|
155 octave_value (const Matrix& m); |
|
156 octave_value (const DiagMatrix& d); |
|
157 octave_value (const RowVector& v, int pcv = -1); |
|
158 octave_value (const ColumnVector& v, int pcv = -1); |
|
159 octave_value (const Complex& C); |
|
160 octave_value (const ComplexMatrix& m); |
|
161 octave_value (const ComplexDiagMatrix& d); |
|
162 octave_value (const ComplexRowVector& v, int pcv = -1); |
|
163 octave_value (const ComplexColumnVector& v, int pcv = -1); |
2825
|
164 octave_value (bool b); |
|
165 octave_value (const boolMatrix& bm); |
3189
|
166 octave_value (char c); |
2376
|
167 octave_value (const char *s); |
|
168 octave_value (const string& s); |
|
169 octave_value (const string_vector& s); |
|
170 octave_value (const charMatrix& chm, bool is_string = false); |
|
171 octave_value (double base, double limit, double inc); |
|
172 octave_value (const Range& r); |
|
173 octave_value (const Octave_map& m); |
2903
|
174 octave_value (octave_stream *s, int n); |
2974
|
175 octave_value (octave_function *f); |
2880
|
176 octave_value (const octave_value_list& m); |
2376
|
177 octave_value (octave_value::magic_colon); |
|
178 octave_value (octave_value::all_va_args); |
|
179 |
|
180 octave_value (octave_value *new_rep); |
|
181 |
|
182 // Copy constructor. |
|
183 |
|
184 octave_value (const octave_value& a) |
|
185 { |
|
186 rep = a.rep; |
|
187 rep->count++; |
|
188 } |
|
189 |
|
190 // Delete the representation of this constant if the count drops to |
|
191 // zero. |
|
192 |
|
193 virtual ~octave_value (void); |
|
194 |
|
195 // This should only be called for derived types. |
|
196 |
2880
|
197 virtual octave_value *clone (void); |
2376
|
198 |
|
199 void make_unique (void) |
|
200 { |
|
201 if (rep->count > 1) |
|
202 { |
|
203 --rep->count; |
|
204 rep = rep->clone (); |
|
205 rep->count = 1; |
|
206 } |
|
207 } |
|
208 |
2477
|
209 void *operator new (size_t size) |
|
210 { return allocator.alloc (size); } |
|
211 |
|
212 void operator delete (void *p, size_t size) |
|
213 { allocator.free (p, size); } |
2376
|
214 |
|
215 // Simple assignment. |
|
216 |
|
217 octave_value& operator = (const octave_value& a) |
|
218 { |
|
219 if (rep != a.rep) |
|
220 { |
|
221 if (--rep->count == 0) |
|
222 delete rep; |
|
223 |
|
224 rep = a.rep; |
|
225 rep->count++; |
|
226 } |
|
227 |
|
228 return *this; |
|
229 } |
|
230 |
2409
|
231 virtual type_conv_fcn numeric_conversion_function (void) const |
2376
|
232 { return rep->numeric_conversion_function (); } |
|
233 |
2409
|
234 void maybe_mutate (void); |
|
235 |
2410
|
236 virtual octave_value *try_narrowing_conversion (void) |
|
237 { return rep->try_narrowing_conversion (); } |
2409
|
238 |
2974
|
239 virtual octave_value do_index_op (const octave_value_list& idx) |
2963
|
240 { return rep->do_index_op (idx); } |
2376
|
241 |
2974
|
242 virtual octave_value_list |
|
243 do_index_op (int nargout, const octave_value_list& idx); |
|
244 |
2963
|
245 void assign (assign_op, const octave_value& rhs); |
2880
|
246 |
2963
|
247 void assign (assign_op, const octave_value_list& idx, |
|
248 const octave_value& rhs); |
2376
|
249 |
2948
|
250 virtual void |
|
251 assign_struct_elt (assign_op, const string& elt_nm, |
|
252 const octave_value& rhs); |
|
253 |
|
254 virtual void |
|
255 assign_struct_elt (assign_op, const string& elt_nm, |
|
256 const octave_value_list& idx, const octave_value& rhs); |
|
257 |
2376
|
258 virtual idx_vector index_vector (void) const |
|
259 { return rep->index_vector (); } |
|
260 |
2420
|
261 virtual octave_value |
2963
|
262 do_struct_elt_index_op (const string& nm, bool silent = false) |
|
263 { return rep->do_struct_elt_index_op (nm, silent); } |
|
264 |
|
265 virtual octave_value |
|
266 do_struct_elt_index_op (const string& nm, const octave_value_list& idx, |
|
267 bool silent = false) |
|
268 { return rep->do_struct_elt_index_op (nm, idx, silent); } |
2376
|
269 |
2979
|
270 octave_lvalue struct_elt_ref (const string& nm); |
2948
|
271 |
2979
|
272 virtual octave_lvalue |
2948
|
273 struct_elt_ref (octave_value *parent, const string& nm); |
2376
|
274 |
|
275 // Size. |
|
276 |
|
277 virtual int rows (void) const |
|
278 { return rep->rows (); } |
|
279 |
|
280 virtual int columns (void) const |
|
281 { return rep->columns (); } |
|
282 |
3195
|
283 virtual int length (void) const |
|
284 { return rep->length (); } |
|
285 |
2376
|
286 // Does this constant have a type? Both of these are provided since |
|
287 // it is sometimes more natural to write is_undefined() instead of |
|
288 // ! is_defined(). |
|
289 |
|
290 virtual bool is_defined (void) const |
|
291 { return rep->is_defined (); } |
|
292 |
|
293 bool is_undefined (void) const |
|
294 { return ! is_defined (); } |
|
295 |
|
296 virtual bool is_real_scalar (void) const |
|
297 { return rep->is_real_scalar (); } |
|
298 |
|
299 virtual bool is_real_matrix (void) const |
|
300 { return rep->is_real_matrix (); } |
|
301 |
|
302 virtual bool is_complex_scalar (void) const |
|
303 { return rep->is_complex_scalar (); } |
|
304 |
|
305 virtual bool is_complex_matrix (void) const |
|
306 { return rep->is_complex_matrix (); } |
|
307 |
|
308 virtual bool is_char_matrix (void) const |
|
309 { return rep->is_char_matrix (); } |
|
310 |
|
311 virtual bool is_string (void) const |
|
312 { return rep->is_string (); } |
|
313 |
|
314 virtual bool is_range (void) const |
|
315 { return rep->is_range (); } |
|
316 |
|
317 virtual bool is_map (void) const |
|
318 { return rep->is_map (); } |
|
319 |
2880
|
320 virtual bool is_list (void) const |
|
321 { return rep->is_list (); } |
|
322 |
2376
|
323 virtual bool is_magic_colon (void) const |
|
324 { return rep->is_magic_colon (); } |
|
325 |
|
326 virtual bool is_all_va_args (void) const |
|
327 { return rep->is_all_va_args (); } |
|
328 |
|
329 // Are any or all of the elements in this constant nonzero? |
|
330 |
|
331 virtual octave_value all (void) const |
|
332 { return rep->all (); } |
|
333 |
|
334 virtual octave_value any (void) const |
|
335 { return rep->any (); } |
|
336 |
|
337 // Other type stuff. |
|
338 |
3209
|
339 virtual bool is_bool_type (void) const |
|
340 { return rep->is_bool_type (); } |
|
341 |
2376
|
342 virtual bool is_real_type (void) const |
|
343 { return rep->is_real_type (); } |
|
344 |
|
345 virtual bool is_complex_type (void) const |
|
346 { return rep->is_complex_type (); } |
|
347 |
|
348 virtual bool is_scalar_type (void) const |
|
349 { return rep->is_scalar_type (); } |
|
350 |
|
351 virtual bool is_matrix_type (void) const |
|
352 { return rep->is_matrix_type (); } |
|
353 |
|
354 virtual bool is_numeric_type (void) const |
|
355 { return rep->is_numeric_type (); } |
|
356 |
|
357 virtual bool valid_as_scalar_index (void) const |
|
358 { return rep->valid_as_scalar_index (); } |
|
359 |
|
360 virtual bool valid_as_zero_index (void) const |
|
361 { return rep->valid_as_zero_index (); } |
|
362 |
|
363 // Does this constant correspond to a truth value? |
|
364 |
|
365 virtual bool is_true (void) const |
|
366 { return rep->is_true (); } |
|
367 |
|
368 // Is at least one of the dimensions of this constant zero? |
|
369 |
|
370 virtual bool is_empty (void) const |
|
371 { return rep->is_empty (); } |
|
372 |
|
373 // Are the dimensions of this constant zero by zero? |
|
374 |
|
375 virtual bool is_zero_by_zero (void) const |
|
376 { return rep->is_zero_by_zero (); } |
|
377 |
2974
|
378 virtual bool is_constant (void) const |
|
379 { return rep->is_constant (); } |
|
380 |
|
381 virtual bool is_function (void) const |
|
382 { return rep->is_function (); } |
2891
|
383 |
2376
|
384 // Values. |
|
385 |
2891
|
386 octave_value eval (void) { return *this; } |
|
387 |
3202
|
388 virtual int int_value (bool req_int = false, bool frc_str_conv = false) const |
|
389 { return rep->int_value (req_int, frc_str_conv); } |
|
390 |
|
391 virtual int nint_value (bool frc_str_conv = false) const |
|
392 { return rep->nint_value (frc_str_conv); } |
|
393 |
2376
|
394 virtual double double_value (bool frc_str_conv = false) const |
|
395 { return rep->double_value (frc_str_conv); } |
|
396 |
2916
|
397 virtual double scalar_value (bool frc_str_conv = false) const |
|
398 { return rep->scalar_value (frc_str_conv); } |
|
399 |
2376
|
400 virtual Matrix matrix_value (bool frc_str_conv = false) const |
|
401 { return rep->matrix_value (frc_str_conv); } |
|
402 |
|
403 virtual Complex complex_value (bool frc_str_conv = false) const |
|
404 { return rep->complex_value (frc_str_conv); } |
|
405 |
|
406 virtual ComplexMatrix complex_matrix_value (bool frc_str_conv = false) const |
|
407 { return rep->complex_matrix_value (frc_str_conv); } |
|
408 |
|
409 virtual charMatrix char_matrix_value (bool frc_str_conv = false) const |
|
410 { return rep->char_matrix_value (frc_str_conv); } |
|
411 |
2493
|
412 virtual string_vector all_strings (void) const |
2376
|
413 { return rep->all_strings (); } |
|
414 |
|
415 virtual string string_value (void) const |
|
416 { return rep->string_value (); } |
|
417 |
|
418 virtual Range range_value (void) const |
|
419 { return rep->range_value (); } |
|
420 |
|
421 virtual Octave_map map_value (void) const; |
|
422 |
2903
|
423 virtual octave_stream *stream_value (void) const; |
|
424 |
|
425 virtual int stream_number (void) const; |
|
426 |
2974
|
427 virtual octave_function *function_value (bool silent = false); |
|
428 |
2880
|
429 virtual octave_value_list list_value (void) const; |
|
430 |
2825
|
431 virtual bool bool_value (void) const |
|
432 { return rep->bool_value (); } |
|
433 |
|
434 virtual boolMatrix bool_matrix_value (void) const |
|
435 { return rep->bool_matrix_value (); } |
|
436 |
2376
|
437 ColumnVector vector_value (bool frc_str_conv = false, |
|
438 bool frc_vec_conv = false) const; |
|
439 |
|
440 ComplexColumnVector |
|
441 complex_vector_value (bool frc_str_conv = false, |
|
442 bool frc_vec_conv = false) const; |
|
443 |
|
444 // Conversions. These should probably be private. If a user of this |
|
445 // class wants a certain kind of constant, he should simply ask for |
|
446 // it, and we should convert it if possible. |
|
447 |
|
448 virtual octave_value convert_to_str (void) const |
|
449 { return rep->convert_to_str (); } |
|
450 |
|
451 virtual void convert_to_row_or_column_vector (void) |
|
452 { rep->convert_to_row_or_column_vector (); } |
|
453 |
2903
|
454 virtual void print (ostream& os, bool pr_as_read_syntax = false) const |
2466
|
455 { rep->print (os, pr_as_read_syntax); } |
2376
|
456 |
2903
|
457 virtual void print_raw (ostream& os, bool pr_as_read_syntax = false) const |
|
458 { rep->print_raw (os, pr_as_read_syntax); } |
|
459 |
|
460 virtual bool print_name_tag (ostream& os, const string& name) const |
|
461 { return rep->print_name_tag (os, name); } |
2376
|
462 |
|
463 void print_with_name (ostream& os, const string& name, |
2903
|
464 bool print_padding = true) const; |
2376
|
465 |
|
466 virtual int type_id (void) const { return rep->type_id (); } |
|
467 |
|
468 virtual string type_name (void) const { return rep->type_name (); } |
|
469 |
3203
|
470 // Unary and binary operations. |
|
471 |
|
472 friend octave_value do_unary_op (octave_value::unary_op, |
|
473 const octave_value&); |
|
474 |
|
475 void do_non_const_unary_op (octave_value::unary_op); |
2376
|
476 |
3205
|
477 void do_non_const_unary_op (octave_value::unary_op, |
|
478 const octave_value_list& idx); |
|
479 |
2575
|
480 friend octave_value do_binary_op (octave_value::binary_op, |
|
481 const octave_value&, |
|
482 const octave_value&); |
2376
|
483 |
|
484 protected: |
|
485 |
|
486 octave_value (const octave_xvalue&) : rep (0) { } |
|
487 |
2903
|
488 void reset_indent_level (void) const |
|
489 { curr_print_indent_level = 0; } |
|
490 |
|
491 void increment_indent_level (void) const |
|
492 { curr_print_indent_level += 2; } |
|
493 |
|
494 void decrement_indent_level (void) const |
|
495 { curr_print_indent_level -= 2; } |
|
496 |
|
497 int current_print_indent_level (void) const |
|
498 { return curr_print_indent_level; } |
|
499 |
|
500 void newline (ostream& os) const; |
|
501 |
|
502 void indent (ostream& os) const; |
|
503 |
|
504 void reset (void) const; |
|
505 |
2376
|
506 private: |
|
507 |
2477
|
508 static octave_allocator allocator; |
|
509 |
2376
|
510 union |
|
511 { |
|
512 octave_value *rep; // The real representation. |
|
513 int count; // A reference count. |
|
514 }; |
2413
|
515 |
2880
|
516 bool convert_and_assign (assign_op, const octave_value_list& idx, |
2413
|
517 const octave_value& rhs); |
|
518 |
2880
|
519 bool try_assignment_with_conversion (assign_op, |
|
520 const octave_value_list& idx, |
2413
|
521 const octave_value& rhs); |
|
522 |
2880
|
523 bool try_assignment (assign_op, const octave_value_list& idx, |
2413
|
524 const octave_value& rhs); |
2903
|
525 |
|
526 static int curr_print_indent_level; |
|
527 static bool beginning_of_line; |
3204
|
528 |
3205
|
529 assign_op unary_op_to_assign_op (unary_op op); |
|
530 |
3204
|
531 binary_op op_eq_to_binary_op (assign_op op); |
|
532 |
|
533 void simple_assign (assign_op orig_op, const octave_value_list& idx, |
|
534 const octave_value& rhs); |
2376
|
535 }; |
|
536 |
3203
|
537 #define OV_UNOP_FN(name) \ |
|
538 inline octave_value \ |
|
539 name (const octave_value& a) \ |
|
540 { \ |
|
541 return do_unary_op (octave_value::name, a); \ |
|
542 } |
|
543 |
|
544 #define OV_UNOP_OP(name, op) \ |
|
545 inline octave_value \ |
|
546 operator op (const octave_value& a) \ |
|
547 { \ |
|
548 return name (a); \ |
|
549 } |
|
550 |
|
551 #define OV_UNOP_FN_OP(name, op) \ |
|
552 OV_UNOP_FN (name) \ |
|
553 OV_UNOP_OP (name, op) |
|
554 |
|
555 OV_UNOP_FN_OP (not, !) |
|
556 OV_UNOP_FN_OP (uminus, -) |
|
557 |
|
558 OV_UNOP_FN (transpose) |
|
559 OV_UNOP_FN (hermitian) |
|
560 |
|
561 // No simple way to define these for prefix and suffix ops? |
|
562 // |
|
563 // incr |
|
564 // decr |
|
565 |
|
566 #define OV_BINOP_FN(name) \ |
|
567 inline octave_value \ |
|
568 name (const octave_value& a1, const octave_value& a2) \ |
|
569 { \ |
|
570 return do_binary_op (octave_value::name, a1, a2); \ |
|
571 } |
|
572 |
|
573 #define OV_BINOP_OP(name, op) \ |
|
574 inline octave_value \ |
|
575 operator op (const octave_value& a1, const octave_value& a2) \ |
|
576 { \ |
|
577 return name (a1, a2); \ |
|
578 } |
|
579 |
|
580 #define OV_BINOP_FN_OP(name, op) \ |
|
581 OV_BINOP_FN (name) \ |
|
582 OV_BINOP_OP (name, op) |
|
583 |
|
584 OV_BINOP_FN_OP (add, +) |
|
585 OV_BINOP_FN_OP (sub, -) |
|
586 OV_BINOP_FN_OP (mul, *) |
|
587 OV_BINOP_FN_OP (div, /) |
|
588 |
|
589 OV_BINOP_FN (pow) |
|
590 OV_BINOP_FN (ldiv) |
|
591 OV_BINOP_FN (lshift) |
|
592 OV_BINOP_FN (rshift) |
|
593 |
|
594 OV_BINOP_FN_OP (lt, <) |
|
595 OV_BINOP_FN_OP (le, <=) |
|
596 OV_BINOP_FN_OP (eq, ==) |
|
597 OV_BINOP_FN_OP (ge, >=) |
|
598 OV_BINOP_FN_OP (gt, >) |
|
599 OV_BINOP_FN_OP (ne, !=) |
|
600 |
|
601 OV_BINOP_FN (el_mul) |
|
602 OV_BINOP_FN (el_div) |
|
603 OV_BINOP_FN (el_pow) |
|
604 OV_BINOP_FN (el_ldiv) |
|
605 OV_BINOP_FN (el_and) |
|
606 OV_BINOP_FN (el_or) |
|
607 |
|
608 OV_BINOP_FN (struct_ref) |
|
609 |
2376
|
610 // If TRUE, allow assignments like |
|
611 // |
|
612 // octave> A(1) = 3; A(2) = 5 |
|
613 // |
|
614 // for A already defined and a matrix type. |
|
615 extern bool Vdo_fortran_indexing; |
|
616 |
|
617 // Should we allow things like: |
|
618 // |
|
619 // octave> 'abc' + 0 |
|
620 // 97 98 99 |
|
621 // |
|
622 // to happen? A positive value means yes. A negative value means |
|
623 // yes, but print a warning message. Zero means it should be |
|
624 // considered an error. |
|
625 extern int Vimplicit_str_to_num_ok; |
|
626 |
|
627 // Should we allow silent conversion of complex to real when a real |
|
628 // type is what we're really looking for? A positive value means yes. |
|
629 // A negative value means yes, but print a warning message. Zero |
|
630 // means it should be considered an error. |
|
631 extern int Vok_to_lose_imaginary_part; |
|
632 |
|
633 // If TRUE, create column vectors when doing assignments like: |
|
634 // |
|
635 // octave> A(1) = 3; A(2) = 5 |
|
636 // |
|
637 // (for A undefined). Only matters when resize_on_range_error is also |
|
638 // TRUE. |
|
639 extern bool Vprefer_column_vectors; |
|
640 |
|
641 // If TRUE, print the name along with the value. |
|
642 extern bool Vprint_answer_id_name; |
|
643 |
|
644 // Should operations on empty matrices return empty matrices or an |
|
645 // error? A positive value means yes. A negative value means yes, |
|
646 // but print a warning message. Zero means it should be considered an |
|
647 // error. |
|
648 extern int Vpropagate_empty_matrices; |
|
649 |
|
650 // How many levels of structure elements should we print? |
|
651 extern int Vstruct_levels_to_print; |
|
652 |
|
653 // Allow divide by zero errors to be suppressed. |
|
654 extern bool Vwarn_divide_by_zero; |
|
655 |
3195
|
656 // If TRUE, resize matrices when performing and indexed assignment and |
|
657 // the indices are outside the current bounds. |
|
658 extern bool Vresize_on_range_error; |
|
659 |
2376
|
660 // Indentation level for structures. |
|
661 extern int struct_indent; |
|
662 |
|
663 extern void increment_struct_indent (void); |
|
664 extern void decrement_struct_indent (void); |
|
665 |
2880
|
666 // Indentation level for lists. |
|
667 extern int list_indent; |
|
668 |
|
669 extern void increment_list_indent (void); |
|
670 extern void decrement_list_indent (void); |
|
671 |
2376
|
672 extern void install_types (void); |
|
673 |
|
674 #endif |
|
675 |
|
676 /* |
|
677 ;; Local Variables: *** |
|
678 ;; mode: C++ *** |
|
679 ;; End: *** |
|
680 */ |