13.07.2015 Views

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Caché</strong> 2012.1 <strong>Upgrade</strong> Checklist2.2.11.8 MVBASIC ChangesMVBasic Defaults For Missing Exponent TermThe MultiValue BASIC PWRS(A,B) built-in function and the vector ** operator (same as the vector ^ operator) have beenmodified. If any component of the dynamic array B is missing, or is the empty string, then that component is treated as thevalue 1.Note:This behavior is different from the DIVS(A,B) and MODS(A,B) built-in functions and the vector / operator.These vector operations treat a missing component in the second operand as a 1, but they treat a component containingthe empty string as a 0.DIVSZ Function Added To MVBASICThere is a new dynamic array function, DIVSZ, in MV BASIC. The DIVSZ function is identical to the DIVS functionexcept that it does not generate an error when an a dynamic array component is divided by zero. If a component of thesecond operand of DIVSZ has the value 0 then the corresponding component of the result dynamic array will be 0.Note:Applications that define a user-written routine or variable using the name DIVSZ will need to rename the routineor identifier.MVB System Variables Not Allowed When Descriptor Is RequiredIn MVBASIC, calling $DATA(@ME) or $GET(@ME) would cause the compiler to crash. Applying $DATA() and$GET() to any other system variable (for example, $DATA(@ACCOUNT)) would always return a result as if the systemvariable were undefined. System variables are not implemented as variables but are instead special cased and are usuallyimplemented as expressions. They cannot used as arguments to functions or statements that require a variable (as opposedto requiring an expressions value.) The compiler now detects these situations and gives appropriate compile-time errorsmessages.Note:It is still legal to write calls such as $DATA(@ME->Property) because a class property can usually be referencedanywhere a variable may be referenced.Disallow Nested Dynamic Array ReferencesIn previous releases, the MVBASIC compiler did not give a syntax error when the program contained a nested dynamicarray reference such as VAR. Trying to compile this illegal syntax would often lead to a crash of the MVBASICcompiler. If the compilation were successful, executing the program would give unpredictable results. This syntax is nolonger accepted.Where the MVBASIC syntax requires a variable reference (such as a left-hand-side of an assignment, or the first operandof a READ statement), the variable reference can contain at most one dynamic array reference (E.g., A) followed byat most one substring reference ( A[s,l]). These rules were not enforced previously and variable references containingmultiple dynamic array references and/or multiple substring references would often produce erroneous object code.It is permissible to use multiple dynamic array references and/or substring references when that variable was being evaluatedas part of an expression, for example,LET X = A[s1,l1][s2,l2]Previously, a sequence of more than two dynamic array references inside an expression evaluation may have produced asyntax error.IFS() Function Corrected And REUSE() AllowedThe function IFS(ifarray, array1, array2) takes 3 dynamic arrays as parameters and it returns a dynamic array result. Theargument ifarray contains boolean values; the shape of the function result is identical to the shape of ifarray. Where ifarraycontains a TRUE component, the corresponding component of the result is the corresponding component of array1. Whereifarray contains a FALSE component, the corresponding component of the result is the corresponding component of array2.32 <strong>Caché</strong> <strong>Upgrade</strong> <strong>Checklists</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!