The -vo10 option enables the IIF operator to behave in a manner compatible with Visual Objects
|+ | -||Specifying +, or just -vo10, causes the IIF operator to behave as it does in Visual Objects.|
If the true and false expressions in an IIF operator are not the same, or one cannot be implicitly converted to the type of the other, the compiler will raise an error.
Visual Objects allows this, and implicitly converts both expressions to USUAL, causing the IIF expression to also return USUAL. This is neither safe or efficient, but code originally written in Visual Objects may depend on this behavior, and if -vo10 is not used, errors may occur at runtime.
LOCAL x as LOGIC
x := TRUE
? IIF( x, 1, "Sunday")
When you use The -vo10 compiler option then the compiler will convert this to:
? IIF( x, (USUAL)1, (USUAL) "Sunday") // for the VO and Vulcan dialect
? IIF( x, (OBJECT)1, (OBJECT) "Sunday") // for the Core dialect
1.Open the project's Properties page.
2.Click the Dialect tab.
3.Change the value.
4.Click here to see the property page