SUBROUTINE MOVE(X,M,IX1,IY1,Y) C C PURPOSE--THIS SUBROUTINE MOVES (COPIES) M ELEMENTS OF THE C SINGLE PRECISION VECTOR X C (STARTING WITH POSITION IX1) C INTO THE SINGLE PRECISION VECTOR Y C (STARTING WITH POSITION IY1). C THIS ALLOWS THE DATA ANALYST C TO TAKE ANY SUBVECTOR IN X AND PLACE IT C ANYWHERE IN THE VECTOR Y. C INPUT ARGUMENTS--X = THE SINGLE PRECISION VECTOR OF C OBSERVATIONS, PART (OR ALL) C OF WHICH IS TO BE MOVED C (COPIED) OVER INTO THE VECTOR Y. C --M = THE INTEGER NUMBER OF ELEMENTS C IN THE VECTOR X TO BE MOVED. C --IX1 = THE INTEGER VALUE WHICH DEFINES C THE POSITION IN THE VECTOR X C OF THE FIRST ELEMENT TO BE MOVED. C --IY1 = THE INTEGER VALUE WHICH DEFINES C THE POSITION IN THE VECTOR Y C WHERE THE FIRST ELEMENT TO BE MOVED C WILL BE PLACED. C OUTPUT ARGUMENTS--Y = THE SINGLE PRECISION VECTOR C INTO WHICH THE COPIED DATA VALUES C FROM THE VECTOR X WILL BE SEQUENTIALLY C PLACED, STARTING IN POSITION IY1 OF Y. C OUTPUT--THE SINGLE PRECISION VECTOR Y. C IN WHICH THE M ELEMENTS IN POSITIONS C IY1, IY1+1, ... , IY1+M-1 C WILL BE IDENTICAL TO THE M ELEMENTS C IN THE X VECTOR IN POSITIONS C IX1, IX1+1, ... , IX1+M-1. C PRINTING--NONE UNLESS AN INPUT ARGUMENT ERROR CONDITION EXISTS. C RESTRICTIONS--THERE IS NO RESTRICTION ON THE MAXIMUM VALUE C OF M FOR THIS SUBROUTINE. C OTHER DATAPAC SUBROUTINES NEEDED--NONE. C FORTRAN LIBRARY SUBROUTINES NEEDED--NONE. C MODE OF INTERNAL OPERATIONS--SINGLE PRECISION. C LANGUAGE--ANSI FORTRAN. C COMMENT--THE ELEMENT IN POSITION IX1 OF THE VECTOR X C IS COPIED INTO POSITION IY1 OF THE VECTOR Y, C THE ELEMENT IN POSITION (IX1+1) OF THE VECTOR X C IS COPIED INTO POSITION (IY1+1) OF THE VECTOR Y, C ... , C THE ELEMENT IN POSITION (IX1+M-1) OF THE VECTOR X C IS COPIED INTO POSITION (IY1+M-1) OF THE VECTOR Y. C COMMENT--THE INPUT VECTOR X REMAINS UNALTERED. C REFERENCES--NONE. C WRITTEN BY--JAMES J. FILLIBEN C STATISTICAL ENGINEERING LABORATORY (205.03) C NATIONAL BUREAU OF STANDARDS C WASHINGTON, D. C. 20234 C PHONE--301-921-2315 C ORIGINAL VERSION--NOVEMBER 1972. C UPDATED --NOVEMBER 1975. C C--------------------------------------------------------------------- C DIMENSION X(1),Y(1) C IPR=6 C C CHECK THE INPUT ARGUMENTS FOR ERRORS C IF(M.LT.1)GOTO50 IF(IX1.LT.1)GOTO65 IF(IY1.LT.1)GOTO70 IF(M.EQ.1)GOTO55 HOLD=X(IX1) ISTART=IX1+1 IEND=IX1+M-1 DO60I=ISTART,IEND IF(X(I).NE.HOLD)GOTO90 60 CONTINUE WRITE(IPR, 9)HOLD GOTO90 50 WRITE(IPR,15) WRITE(IPR,47)M RETURN 55 WRITE(IPR,18) GOTO90 65 WRITE(IPR,25) WRITE(IPR,47)IX1 RETURN 70 WRITE(IPR,35) WRITE(IPR,47)IY1 RETURN 90 CONTINUE 9 FORMAT(1H ,108H***** NON-FATAL DIAGNOSTIC--THE FIRST INPUT ARGUME 1NT (A VECTOR) TO THE MOVE SUBROUTINE HAS ALL ELEMENTS = ,E15.8,6 1H *****) 15 FORMAT(1H , 91H***** FATAL ERROR--THE SECOND INPUT ARGUMENT TO THE 1 MOVE SUBROUTINE IS NON-POSITIVE *****) 18 FORMAT(1H ,100H***** NON-FATAL DIAGNOSTIC--THE SECOND INPUT ARGUME 1NT TO THE MOVE SUBROUTINE HAS THE VALUE 1 *****) 25 FORMAT(1H , 91H***** FATAL ERROR--THE THIRD INPUT ARGUMENT TO THE 1 MOVE SUBROUTINE IS NON-POSITIVE *****) 35 FORMAT(1H , 91H***** FATAL ERROR--THE FOURTH INPUT ARGUMENT TO THE 1 MOVE SUBROUTINE IS NON-POSITIVE *****) 47 FORMAT(1H , 35H***** THE VALUE OF THE ARGUMENT IS ,I8 ,6H *****) C C-----START POINT----------------------------------------------------- C DO100I=1,M J=IX1-1+I K=IY1-1+I Y(K)=X(J) 100 CONTINUE C RETURN END