#
Fortran Wiki

shifta

## Description

Returns a value corresponding to `i`

with all of the bits shifted right by `shift`

places. If the absolute value of `shift`

is greater than `bit_size(i)`

, the value is undefined. Bits shifted out from the right end are lost. The fill is arithmetic: the bits shifted in from the left end are equal to the leftmost bit, which in two’s complement representation is the sign bit.

## Standard

Fortran 2008 and later

## Class

Elemental function

## Syntax

`result = shifta(i, shift)`

## Arguments

`i`

- The type shall be `integer`

.
`shift`

- The type shall be `integer`

.

## Return value

The return value is of type `integer`

and of the same kind as `i`

.

## See also

shiftl, shiftr

Created on September 19, 2010 18:15:49
by

Jason Blevins
(174.101.53.244)
(724 characters / 0.0 pages)