CXML
SHIFT (3sciport)
Performs a left circular shift
SYNOPSIS
boolean = SHIFT( arg1, arg2 )
FUNCTION VALUE
shift Boolean. (Integer, Logical, or Real.)
The circularly left shifted 64 bit boolean result.
ARGUMENTS
arg1 Integer, Logical, or Real.
The 64 bit boolean input datum to be shifted.
arg2 Integer.
The shift count.
DESCRIPTION
The external function SHIFT returns the 64 bit boolean result of left
circularly shifting input data arg1 by arg2 bits. The following list
catalogues actions taken by SHIFT for all values of arg2:
[-inf,-65] result is zero
[-64,-1] arg1 is right shifted by arg2
[0,64] arg1 is left circularly shifted
[65,128] arg1 is left shifted by arg2-64
[129,+inf] result is zero
For equations and other information, see Volume 3: UNICOS Math and
Scientific Library Reference Manual SR-2081 7.0, Cray Research, Inc.
NOTES
Since SHIFT is not an ANSI Fortran 77 intrinsic function, it must be
declared as an external function of type integer, logical or real. For
example:
EXTERNAL SHIFT
INTEGER SHIFT
...
I = SHIFT( 'F0F0F0F0F0F0F0F0'X,8 )
! Same as I = 'F0F0F0F0F0F0F0F0'X
For more information about boolean functions, see the sciport man page.
CXML Home Page Index of CXML Routines