I had a library of functions I created a lonngg time ago that I treated like black boxes and never opened but now I find myself in this ugly position of recreating it all.
OPTION DEFINT DEF INSERT_ARY A[],P,B[] DIM _A[0] COPY _A,A COPY A,P,B COPY A,LEN(A)-LEN(B),_A,P,LEN(A)-P ENDThis has the disadvantages of requiring a copy of A in RAM and requiring 3 copy instructions. I must be unimaginative because I'm not coming up with a better method at the moment.