This compiler option allows you to control what the compiler will do with local variables, parameters and return types without type specification.
The default is -vo15+ for the VO and Vulcan dialects. For the Core dialect the default is -vo15-.
-vo15[+|-]
+ | - | Specifying +, or just -vo15, tells the compiler to treat untyped locals and return types as USUAL |
1.Open the project's Properties page.
2.Click the Dialect tab.
3.Change the value.
4.Click here to see the property page.
FUNCTION LongSquare(nLong as LONG) -/ Note that the return type is missing
RETURN nLong * nLong
In VO/Vulcan mode, this will, by default, generate a method with a USUAL return type. In Core mode, this will not compile, but produce a "Missing Type" error (XS1031).
When you compile with -vo15-, this will also produce an error.
Similar code that will be influenced by this compiler option:
FUNCTION MultiplyLong(nParam1 as LONG, nParam2) AS LONG -/ Note that the type for nParam2 is missing
RETURN nParam1 * nParam2
And:
FUNCTION Tomorrow() AS Date
LOCAL dToday := Today() -/ Note that the AS DATE is missing
RETURN dToday + 1