Navigation bar
  Start Previous page
 231 of 283 
Next page End 226 227 228 229 230 231 232 233 234 235 236  

222
Shl
Type
Function returning the same type as the first parameter.
Invocation
Shl(val, shiftCnt)
Parameter
Method
Type
Description
val
ByVal
integral
The value to be shifted.
shiftCnt
ByVal
int8/16
The number of bit positions to shift (0-16).
Discussion
This function returns the value provided as the first parameter but shifted left the number of bit positions
specified by the second parameter.  If the shiftCnt is zero, the value is returned unchanged.  If the
shiftCnt is greater than or equal to the number of bits in the value provided, the return value will be
zero.  For signed types, the sign of the result will be the same as that of the provided value.
The type of the return value will be the same as the type of the first parameter.
Example
Dim i as Integer, j as Integer
i = 23
j = Shl(i, 5)
' result will be 736
Compatibility
This function is not available in BasicX compatibility mode.
See Also
Previous page Top Next page