_rotl.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 38 行
GML
38 行
.func _rotl
#include <stdlib.h>
unsigned int _rotl( unsigned int value,
unsigned int shift );
.ixfunc2 '&Rotate' &func
.funcend
.desc begin
The &func function rotates the unsigned integer, determined by
.arg value,
to the left by the number of bits specified in
.arg shift.
If you port an application using &func between a 16-bit and a 32-bit
environment, you will get different results because of the difference
in the size of integers.
.desc end
.return begin
The rotated value is returned.
.return end
.see begin
.seelist _rotl _lrotl _lrotr _rotr
.see end
.exmp begin
#include <stdio.h>
#include <stdlib.h>
unsigned int mask = 0x0F00;
void main()
{
mask = _rotl( mask, 4 );
printf( "%04X\n", mask );
}
.exmp output
F000
.exmp end
.class WATCOM
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?