VARIANT_BOOL |
Top Previous Next |
VARIANT_BOOL is a type currently defined as a short:
/* 0 == FALSE, -1 == TRUE */ typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1) #define VARIANT_FALSE ((VARIANT_BOOL)0)
Here is an example
if (VARIANT_TRUE == pCompOcc->ReferencedDocumentDescriptor->ReferenceMissing) { // Maybe a missing and skipped component... continue ; }
Here is an example:
VARIANT_BOOL bSuppressed = pFeaturePatternElement->GetSuppressed () ;
TRACE (L"Element %d suppressed = %d\n",iElem,bSuppressed) ;
In this case bSuppressed will show either -1 (true) or 0 (false).
You can use the predefined macros VARIANT_TRUE and VARIANT_FALSE as values.
Since VARIANT_FALSE is 0 you can use them in ifs like this:
if (p->InventorFunction()) { ...do something... }
|
Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)