Using ObjectScript
- Introduction to ObjectScript
- Features
- Sample Class with ObjectScript
- Sample Routine
- Language Overview
- Statements and Commands
- Functions
- Expressions
- Variables
- Operators
- See Also
- ObjectScript Syntax Rules
- Left-to-Right Precedence
- Case Sensitivity
- Types of Values
- Routine Syntax
- Method Syntax
- Whitespace
- Identifiers
- Labels
- Comments
- Namespaces
- Reserved Words
- Defining Procedures
- Procedure Syntax
- Procedures as Functions
- Procedure Variables
- Public and Private Procedures
- Procedure Code
- Indirection, XECUTE Commands, and JOB Commands within Procedures
- Error Traps within Procedures
- Invoking Code and Passing Arguments
- Calling Units of Code
- Formal Argument Lists and Examples
- Passing Arguments (Basics)
- Passing a Variable Number of Arguments
- Passing ByRef or Output Arguments
- Comparison: Arguments by Value and Arguments by Reference
- Variables
- Kinds of Variables
- Variable Names
- Variable Availability and Scope
- Variable Types and Conversion
- Variable Length
- Variable Existence and Undefined Variables
- #dim (Optional)
- Global Variables and Journaling
- Special Variables
- Operators
- Introduction
- Operator Precedence
- String-to-Number Conversion
- Expressions
- Arithmetic Operators
- Numeric Relational Operators
- Logical Comparison Operators
- String Concatenate Operator (_)
- String Relational Operators
- Pattern Match Operator (?)
- Indirection Operator (@)
- Commands
- Command Keywords
- Command Arguments
- Command Postconditional Expressions
- Multiple Commands on a Line
- Variables
- Error Processing
- Transaction Processing
- Locking and Concurrency Control
- Invoking Code
- Controlling Flow
- Write Commands
- READ Command
- Files and Devices
- Extended References
- Multidimensional Arrays
- Introduction and Terminology
- Where Multidimensional Arrays Are Supported
- Subscript Rules
- Manipulating Multidimensional Arrays
- Class-Based Arrays
- Numeric Values in ObjectScript
- Numeric Literals
- Canonical Form of Numbers
- Strings as Numbers
- Extremely Large Numbers as Strings
- Concatenating Numbers
- Floating Point Numbers
- Scientific Notation
- Extremely Large Numbers
- Strings in ObjectScript
- String Literals
- Non-Printing Characters and Unicode Characters
- Null Strings and the Null Character
- Concatenating Strings
- String Comparisons
- Commonly Used Functions
- Advanced Features of $EXTRACT
- Lists in ObjectScript
- Native List Format
- List Functions
- Sparse Lists and Sublists
- List Compression
- Delimited Strings as an Alternative
- Lists and Delimited Strings Compared
- Class-Based Lists
- Bit Strings
- Date and Time Values
- Using Macros and Include Files
- Macro Basics
- Include File Basics
- Defining Macros
- Including Include Files
- Where to See Expanded Macros
- See Also
- Embedded SQL
- Locking and Concurrency Control
- Introduction
- Lock Names
- The Lock Table
- Locks and Arrays
- Using the LOCK Command
- Lock Types
- Escalating Locks
- Locks, Globals, and Namespaces
- Avoiding Deadlock
- Practical Uses for Locks
- Locking and Concurrency in SQL and Persistent Classes
- See Also
- Details of Lock Requests and Deadlocks
- Waiting Lock Requests
- Queuing of Array Node Lock Requests
- ECP Local and Remote Lock Requests
- Avoiding Deadlock
- See Also
- Managing the Lock Table
- Available Tools for Managing the Lock Table
- Viewing Locks in the Management Portal
- Removing Locks in the Management Portal
- ^LOCKTAB Utility
- See Also
- Transaction Processing
- About Transactions in InterSystems IRIS
- Managing Transactions Within Applications
- Automatic Transaction Rollback
- System-Wide Issues with Transaction Processing
- Suspending All Current Transactions
- Working with %Status Values
- Basics of Working with Status Values
- Examples
- Variation (%objlasterror)
- Multiple Errors Reported in a Status Value
- Returning a %Status
- %SYSTEM.Error
- See Also
- Using TRY-CATCH
- Introduction
- Using THROW with TRY-CATCH
- Using $$$ThrowOnError and $$$ThrowStatus Macros
- Using the %Exception.SystemException and %Exception.AbstractException Classes
- Other Considerations with TRY-CATCH
- Error Logging
- Logging Application Errors
- Using Management Portal to View Application Error Logs
- Using ^%ERN to View Application Error Logs
- See Also
- Command-Line Routine Debugging
- Secure Debug Shell
- Debugging with the ObjectScript Debugger
- Debugging With BREAK
- Using %STACK to Display the Stack
- Other Debugging Tools
- Process-Private Globals
- (Legacy) Using ^%ETN for Error Logging
- (Legacy) Traditional Error Processing
- How Traditional Error Processing Works
- Handling Errors with $ZTRAP
- Handling Errors with $ETRAP
- Handling Errors in an Error Handler
- Forcing an Error
- Processing Errors at the Terminal Prompt
- Legacy Forms of Subroutines