RSC/MP Programming Manual
API Function Descriptions
RscSwapShort [RSCSI]
RscSwapShort [RSCSI] 
The RscSwapShort function exchanges the positions of bytes in a integer. Use this 
function on workstations that are little-endian to convert to/from big-endian host va lues. 
If the workstation operating system is big-endian, this function does not modify the 
integer. 
RscSwapShort replaces the RscSwapInt function, which is still supported for older 
applications. 
For multithreaded operating systems, the application can call RscSwapShort or 
RscSwapLong at any time; the application does not have to wait for completion of a 
previous API call. 
USHORT RscSwapShort
(SHORT nValue  /* in */
);
nValue 
The integer value to reverse. 
Return Value 
The return va lue is the value of nValue with its bytes reversed if RscSwapShort is 
called on a little-endian workstation (for example Linux, Solaris x86 or Windows). 
The return va lue is nValue if RscSwapShort is called on a big-endian workstation (for 
example AIX, HP-UX, or Solaris on SPARC). 
HP NonStop Remote Server Call (RSC/MP) Programming Manual — 522360-006 
10 - 33 










