Using Caché ObjectScript - InterSystems Documentation
Using Caché ObjectScript - InterSystems Documentation
Using Caché ObjectScript - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.6 Boolean Values ......................................................................................................................... 20<br />
3.7 Dates ......................................................................................................................................... 21<br />
4 Variables ............................................................................................................................................ 23<br />
4.1 Categories of Variables ............................................................................................................. 23<br />
4.1.1 Local Variables ............................................................................................................... 23<br />
4.1.2 Process-private Globals .................................................................................................. 25<br />
4.1.3 Globals ........................................................................................................................... 26<br />
4.1.4 Array Variables ............................................................................................................... 27<br />
4.1.5 Special Variables ............................................................................................................ 27<br />
4.1.6 Object Properties ............................................................................................................ 28<br />
4.2 Variable Typing and Conversion ............................................................................................... 28<br />
4.2.1 Object Values .................................................................................................................. 29<br />
4.3 Variable Declaration and Scope ................................................................................................ 30<br />
4.3.1 <strong>Using</strong> #Dim .................................................................................................................... 30<br />
5 Operators and Expressions .............................................................................................................. 31<br />
5.1 Introduction to Operators and Expressions .............................................................................. 31<br />
5.1.1 Operator Precedence ...................................................................................................... 32<br />
5.1.2 Expressions .................................................................................................................... 34<br />
5.1.3 Assignment ..................................................................................................................... 35<br />
5.1.4 String-to-Number Conversion ........................................................................................ 36<br />
5.2 Arithmetic Operators ................................................................................................................ 36<br />
5.2.1 Unary Positive Operator (+) ........................................................................................... 36<br />
5.2.2 Unary Negative Operator (-) .......................................................................................... 37<br />
5.2.3 Addition Operator (+) ..................................................................................................... 37<br />
5.2.4 Subtraction Operator (-) ................................................................................................. 37<br />
5.2.5 Multiplication Operator (*) ............................................................................................ 38<br />
5.2.6 Division Operator (/) ...................................................................................................... 38<br />
5.2.7 Exponentiation Operator (**) ........................................................................................ 39<br />
5.2.8 Integer Divide Operator ( \ ) ........................................................................................... 40<br />
5.2.9 Modulo Operator (#) ...................................................................................................... 40<br />
5.3 Logical Comparison Operators ................................................................................................ 41<br />
5.3.1 Unary Not ...................................................................................................................... 41<br />
5.3.2 Precedence and Logical Operators ................................................................................. 41<br />
5.3.3 Binary And .................................................................................................................... 41<br />
5.3.4 Binary Or ....................................................................................................................... 43<br />
5.4 String Operators ....................................................................................................................... 44<br />
5.4.1 Binary Concatenate ....................................................................................................... 44<br />
5.5 Numeric Relational Operators ................................................................................................. 45<br />
5.5.1 Binary Less Than .......................................................................................................... 45<br />
5.5.2 Binary Greater Than ...................................................................................................... 45<br />
5.5.3 Greater Than or Equal To .............................................................................................. 45<br />
5.5.4 Less Than or Equal To ................................................................................................... 46<br />
5.6 String Relational Operators ...................................................................................................... 46<br />
5.6.1 Binary Equals ................................................................................................................ 46<br />
5.6.2 Binary Contains ............................................................................................................. 47<br />
5.6.3 Binary Follows .............................................................................................................. 48<br />
5.6.4 Binary Sorts After ......................................................................................................... 49<br />
5.7 Pattern Matching ...................................................................................................................... 49<br />
5.7.1 Specifying How Many Times a Pattern Can Occur ....................................................... 52<br />
5.7.2 Specifying Multiple Patterns .......................................................................................... 53<br />
iv<br />
<strong>Using</strong> <strong>Caché</strong> <strong>ObjectScript</strong>