I want to initialize an uninitialized arrayptr array from an initialized
arratyptr array .
Here is the full code of my attempt that does not compile :
extern
fun arr_exmpl2{n:nat}
(A1 : !arrayptr (int,n),
A : !arrayptr (int?,n) >> arrayptr (int,n) , n: int(n) ): void
implement
arr_exmpl2(A1,A,n) = let
implement
array_initize$init (i,x) = let
val (fpf | A1) = decode($vcopyenv_vt (A1))
val () = x := g0u2i(i) + arrayptr_get_at_gint(A1,i)
(* why does not i or sz2i(i) works above )
( what is g0u2i and why sz2i(i) does not work here ?? *)
val () = fpf (A1)
in () end
val () = arrayptr_initize(A,i2sz(n))
in () end
Thanks