diff liboctave/Array.cc @ 4898:8fd9495f5054

[project @ 2004-06-04 13:29:33 by jwe]
author jwe
date Fri, 04 Jun 2004 13:29:34 +0000
parents bbddd4339cf2
children c638c144d4da
line wrap: on
line diff
--- a/liboctave/Array.cc
+++ b/liboctave/Array.cc
@@ -2944,8 +2944,8 @@
 	      // We didn't start out with all zero dimensions, so if
 	      // index is a colon, it refers to the current LHS
 	      // dimension.  Otherwise, it is OK to enlarge to a
-	      // dimension given by the largest index (but that index
-	      // needs to be a number, not a colon).
+	      // dimension given by the largest index, but if that 
+	      // index is a colon the new dimension is singleton.
 
 	      if (i < lhs_dims_len
 		  && (idx(i).is_colon () || idx(i).max () < lhs_dims(i)))
@@ -2953,17 +2953,7 @@
 	      else if (! idx(i).is_colon ())
 		new_dims(i) = idx(i).max () + 1;
 	      else
-		{
-		  // XXX FIXME XXX -- can we provide a more
-		  // informative message here?
-
-		  (*current_liboctave_error_handler)
-		    ("invalid array index for assignment");
-
-		  retval = 0;
-
-		  break;
-		}
+		new_dims(i) = 1;
 	    }
 	}