rough outline of prim2c with arithmtic ops