Bit operations in VBScript
-
Let me start with one of my own from my days when I either didn't understand or didn't trust VBScript
Function TestBit(Value, Bit)
TestBit = ((CLng(Value) And CLng(Bit)) > 0)
End FunctionAll I'll say is that I was young and foolish.
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
Let me start with one of my own from my days when I either didn't understand or didn't trust VBScript
Function TestBit(Value, Bit)
TestBit = ((CLng(Value) And CLng(Bit)) > 0)
End FunctionAll I'll say is that I was young and foolish.
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
Let me start with one of my own from my days when I either didn't understand or didn't trust VBScript
Function TestBit(Value, Bit)
TestBit = ((CLng(Value) And CLng(Bit)) > 0)
End FunctionAll I'll say is that I was young and foolish.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
didn't trust VBScript
Can hardly blame you there... damn context-sensitive "and"s...
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
-
Let me start with one of my own from my days when I either didn't understand or didn't trust VBScript
Function TestBit(Value, Bit)
TestBit = ((CLng(Value) And CLng(Bit)) > 0)
End FunctionAll I'll say is that I was young and foolish.
cheers, Chris Maunder
CodeProject.com : C++ MVP
That reminds me of a previous boss who made us initialize all C++ pointers to null TWICE (just to make sure)
-
That reminds me of a previous boss who made us initialize all C++ pointers to null TWICE (just to make sure)