Advertisement
jargon

basCForVB.bas

Feb 23rd, 2013
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Attribute VB_Name = "basCForVB"
  2. Public Function CBoolSwitch(Test As Variant, ArgT As Variant, ArgF As Variant) As Variant
  3.    
  4.     Select Case Test
  5.     Case True
  6.         CBoolSwitch = ArgT
  7.     Case Else
  8.         CBoolSwitch = ArgF
  9.     End Select
  10.  
  11. End Function
  12.  
  13. Public Sub CIncr(Arg As Variant, Value As Variant)
  14.     Arg = Arg + Value
  15. End Sub
  16.  
  17. Public Sub CDecr(Arg As Variant, Value As Variant)
  18.     Arg = Arg - Value
  19. End Sub
  20.  
  21. Public Sub CMult(Arg As Variant, Value As Variant)
  22.     Arg = Arg * Value
  23. End Sub
  24.  
  25. Public Sub CDiv(Arg As Variant, Value As Variant)
  26.     If Value <> 0 Then
  27.         Arg = Arg / Value
  28.     End If
  29. End Sub
  30.  
  31. Public Function CLShift(A As Variant, B As Variant) As Variant
  32.     CLShift = A * 2 ^ B
  33. End Function
  34.  
  35. Public Function CRShift(A As Variant, B As Variant) As Variant
  36.     CRShift = A / 2 ^ B
  37. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement