Public Function Rshift (ByVal lthis, ByVal lbits)
On Error Resume Next
Init
If (lbits <= 0) Then
Rshift = Lthis
ElseIf (Lbits >) Then
' .. Error ...
ElseIf (Lbits >) Then
Rshift = 0
Else
If (Lthis and M_lpower2 (31-lbits)) = M_lpower2 (31-lbits) Then
Rshift = (Lthis and (M_lpower2 (31-lbits)-1)) * M_LPOWER2 (lbits) Or
M_lpower2 (31)
Else
Rshift = (Lthis and (M_lpower2 (31-lbits)-1)) * M_LPOWER2 (Lbits)
End If
End If
End Function
Public Function LShift (ByVal lthis, ByVal lbits)
On Error Resume Next
Init
If (lbits <= 0) Then
LShift = Lthis
ElseIf (Lbits >) Then
' ... error ...
ElseIf (Lbits >) Then
LShift = 0
Else
If (Lthis and M_lpower2 ()) = M_lpower2 Then
LShift = (lthis and &h7fffffff) \ M_lpower2 (lbits) Or m_lpower2 (31-lbits)
Else
LShift = lthis \ M_lpower2 (lbits)
End If
End If
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service