+
+ method output_values : int -> raw_data =
+ fun (length_max : int) ->
+ let init = new value (N 0) in
+ let container = Array.make length_max
+ (Array.make self#width init) in
+ let index = ref 0 in
+
+ try
+ while !index < length_max do
+ container.(!index) <- self#at !index;
+ incr index;
+ done;
+ container
+
+ with x ->
+ match x with
+ | Invalid_argument s ->
+ Array.sub container 0 !index
+ | _ -> raise x
+
+