Mercurial > hg > octave-lyh
comparison src/pt-idx.cc @ 11067:d7f0d115c10c
pt-idx.cc (tree_expression::lvalue): use octave_map here, not octave_scalar_map
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 30 Sep 2010 12:53:23 -0400 |
parents | e678346a47d9 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11066:e678346a47d9 | 11067:d7f0d115c10c |
---|---|
528 | 528 |
529 if (i > 0 && type [i-1] == '(') | 529 if (i > 0 && type [i-1] == '(') |
530 { | 530 { |
531 octave_value_list pidx = idx.back (); | 531 octave_value_list pidx = idx.back (); |
532 | 532 |
533 // Use octave_map, not octave_scalar_map so that the | |
534 // dimensions are 0x0, not 1x1. | |
533 if (tmp.is_undefined ()) | 535 if (tmp.is_undefined ()) |
534 { | 536 { |
535 if (pidx.has_magic_colon ()) | 537 if (pidx.has_magic_colon ()) |
536 gripe_invalid_inquiry_subscript (); | 538 gripe_invalid_inquiry_subscript (); |
537 else | 539 else |
538 tmp = octave_scalar_map (); | 540 tmp = octave_map (); |
539 } | 541 } |
540 else if (autoconv) | 542 else if (autoconv) |
541 tmp = octave_scalar_map (); | 543 tmp = octave_map (); |
542 | 544 |
543 retval.numel (tmp.numel (pidx)); | 545 retval.numel (tmp.numel (pidx)); |
544 | 546 |
545 tmpi = i-1; | 547 tmpi = i-1; |
546 tmpidx.push_back (tidx); | 548 tmpidx.push_back (tidx); |