NAME mvbits - move specified bits SYNOPSIS subroutine mvbits (src, ini1, nbits, des, ini2 ) integer*4 src, ini1, nbits, des, ini2 DESCRIPTION This routine moves bits from src, starting with bit ini1, number of bits moved nbits, to des, starting with bit ini2. NOTES Usage: INTEGER*4 src, ini1, nbits, des, ini2 ... CALL mvbits(src, ini1, nbits, des, ini2) Restrictions: ini1 + nbits < 32 ini2 + nbits < 32 Example: demo% cat mvb1.f * mvb1.f <-- From src, initial bit 0, move 3 bits to * des initial bit 3 * src des * 543210 543210 <-- Bit numbers (VMS convention) * 000111 000001 <-- Values before move * 000111 111001 <-- Values after move INTEGER*4 src, ini1, nbits, des, ini2 DATA src, ini1, nbits, des, ini2 & / 7, 0, 3, 1, 3 / CALL mvbits ( src, ini1, nbits, des, ini2 ) WRITE (*,"(5O3)") src, ini1, nbits, des, ini2 END demo% f77 -silent mvb1.f demo% a.out 7 0 3 71 3 demo% FILES libF77.a SEE ALSO FORTRAN 77 Reference Manual
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |