diff liboctave/idx-vector.cc @ 434:ec2a6ad30162

[project @ 1994-05-25 21:00:20 by jwe]
author jwe
date Wed, 25 May 1994 21:02:14 +0000
parents 7479f36341f9
children 393e95f46b51
line wrap: on
line diff
--- a/liboctave/idx-vector.cc	Wed May 25 19:17:10 1994 +0000
+++ b/liboctave/idx-vector.cc	Wed May 25 21:02:14 1994 +0000
@@ -313,6 +313,15 @@
     }
 }
 
+void
+idx_vector::shorten (int n)
+{
+  if (n > 0 && n <= len)
+    len = n;
+  else
+    panic_impossible ();
+}
+
 ostream&
 operator << (ostream& os, const idx_vector& a)
 {