##
## Klassenmethoden
##
ClassRope.new()
    ^self.new_for(5)
!
ClassRope.new_for(size)
    ^super.new().init(size)
!
##
## Instanzmethoden
##
Rope.size
	^size
!
Rope.vector_size
	^vector.size
!
Rope.init(guess_size)
	size = 0;
	^self.init_vector_with(guess_size)
!
Rope.init_vector_with(n)
	vector = FixedVector.new(n);
    ^self
!
Rope.extend(n)
	|old_vector|
    old_vector = vector;
	self.init_vector_with(size + n);
	vector.copy_entries_from(old_vector)

!

Rope.add_last(e)
	if size >= vector.size
    then
        self.extend(10)
	else 
		self
	endif;
	vector.set_nth(size,e);
    size = size+1;
	^e
!
Rope.add(e)
	self.add_last(e)
!
Rope.print()
	"Rope(".simple_print();
	size.print();
	" [".simple_print();
	#vector.size.print();
	vector.print_from_to(0,size.min(10));
	if size > 10 then "...])" else "])" endif.simple_print()
	#"))".simple_print()

#eof
