Variants in Expressions

All operators except A, is, and in take variant operands. Except for comparisons, which always return a Boolean result, any operation on a variant value returns a variant result. If an expression combines variants with statically-typed values, the statically-typed values are automatically converted to variants.

This is not true for comparisons, where any operation on a Null variant produces a Null variant. For example:

assigns a Null variant to v. By default, comparisons treat the Null variant as a unique value that is less than any other value. For example:

In this example, the else part of the if statement will be executed. This behavior can be changed by setting the NullEqualityRule and NullMagnitudeRule global variables.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment