Ahh, the joys of Visual Basic
-
Hehe finally i made my way to The Weird and The Wonderful. Enjoy! I am sitting here writing some vc++ code cloning some Dom nodes with MSXML and cloneNode(VARIANT_BOOL deep) and i noticed that the deep cloning isn't working. After some googling i found this gem
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)with this explanation "This was developed by the Visual Basic folks" Clickety Microsoft... the only place where VARIANT_TRUE != true Thank you Visual Basic Team.
-
Hehe finally i made my way to The Weird and The Wonderful. Enjoy! I am sitting here writing some vc++ code cloning some Dom nodes with MSXML and cloneNode(VARIANT_BOOL deep) and i noticed that the deep cloning isn't working. After some googling i found this gem
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)with this explanation "This was developed by the Visual Basic folks" Clickety Microsoft... the only place where VARIANT_TRUE != true Thank you Visual Basic Team.
Welcome to W & W :)
-
Hehe finally i made my way to The Weird and The Wonderful. Enjoy! I am sitting here writing some vc++ code cloning some Dom nodes with MSXML and cloneNode(VARIANT_BOOL deep) and i noticed that the deep cloning isn't working. After some googling i found this gem
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)with this explanation "This was developed by the Visual Basic folks" Clickety Microsoft... the only place where VARIANT_TRUE != true Thank you Visual Basic Team.
-
Hehe finally i made my way to The Weird and The Wonderful. Enjoy! I am sitting here writing some vc++ code cloning some Dom nodes with MSXML and cloneNode(VARIANT_BOOL deep) and i noticed that the deep cloning isn't working. After some googling i found this gem
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)with this explanation "This was developed by the Visual Basic folks" Clickety Microsoft... the only place where VARIANT_TRUE != true Thank you Visual Basic Team.
Yes, that always used to catch me out with VBA. The worst part was that a check box had three states - true, false and indeterminate. Guess what the indeterminate state was? Yes it was 1! :((
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
Yes, that always used to catch me out with VBA. The worst part was that a check box had three states - true, false and indeterminate. Guess what the indeterminate state was? Yes it was 1! :((
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
What means a check box to the indeterminate?! Does it randomly mark it or not ? Or maybe just check it in half :confused:
A checkbox could be checked, not checked or have a light grey fill - the light grey fill meant indeterminate.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
What means a check box to the indeterminate?! Does it randomly mark it or not ? Or maybe just check it in half :confused:
I think it's the check box that is filled in with a square. Like when you have an installer and there's a tree of options, and the root option has a check box that checks or unchecks all of the sub-options, and it turns to a square if you only check at least one but not all sub-options.
-
This isn't a Microsoft thing. BASIC is the issue. non-zero = TRUE. But it's still idiotic, and yet another reason to avoid lecacy crap such as BASIC. X|
I think this is a legacy from the pre-BASIC days of writing everything in assembler or direct hex (or octal) code. The value of -1 for a byte of 8 bits was 1111 1111 which also means true (all bits set to 1). This seems to have percolated into VB. I agree that it doesn't seem logical these days but way back then there was no strong typing and bool didn't really exist.
I may not last forever but the mess I leave behind certainly will.
-
Yes, that always used to catch me out with VBA. The worst part was that a check box had three states - true, false and indeterminate. Guess what the indeterminate state was? Yes it was 1! :((
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
I think this is a legacy from the pre-BASIC days of writing everything in assembler or direct hex (or octal) code. The value of -1 for a byte of 8 bits was 1111 1111 which also means true (all bits set to 1). This seems to have percolated into VB. I agree that it doesn't seem logical these days but way back then there was no strong typing and bool didn't really exist.
I may not last forever but the mess I leave behind certainly will.
-
Hehe finally i made my way to The Weird and The Wonderful. Enjoy! I am sitting here writing some vc++ code cloning some Dom nodes with MSXML and cloneNode(VARIANT_BOOL deep) and i noticed that the deep cloning isn't working. After some googling i found this gem
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)with this explanation "This was developed by the Visual Basic folks" Clickety Microsoft... the only place where VARIANT_TRUE != true Thank you Visual Basic Team.
-
I suspect you maybe right. something *convenient* and to do with cpu condition flags. :)
-
What means a check box to the indeterminate?! Does it randomly mark it or not ? Or maybe just check it in half :confused:
Indeterminate shows if there are sub-checkboxes belonging to this one, some of them can be checked, some unchecked. So the parent checkbox can't be 'checked' or 'unchecked' but partially-checked. ;-)