C+ C Title: JSWAP C Author: T. R. Wyant C Date: 21-Sep-1987 C Modified: C Remarks: C INTEGER*4 function JSWAP takes as input one INTEGER*4 C number, and returns it with the words swapped. The C intent is to make the conversion between the FORTRAN C standard representation for double-precision integers C and the RSX internal standard for same. C- FUNCTION JSWAP(VICTIM) INTEGER*4 JSWAP ! Swapped value. INTEGER*4 VICTIM ! Doubleword to swap. INTEGER*4 JTEMP ! Copy of input. INTEGER*2 ITEMP(2) ! Copy of input. INTEGER*2 IWORK ! REAL temporary. EQUIVALENCE (JTEMP, ITEMP) JTEMP = VICTIM IWORK = ITEMP(1) ITEMP(1) = ITEMP(2) ITEMP(2) = IWORK JSWAP = JTEMP RETURN END