method inttovar i =
    if (i >= size) then fatal "out of boundary i = %d size = %d" i size;
    inttovar.(i)