Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).


Caché Basic variables are variants. Declaration using Dim is optional. The value of an unassigned variable is the empty string ("").

x = 4 + 2
println "result = ", x
println "the empty string = ",y
Copy code to clipboard

It's useful to specify Option Explicit and declare variables. At compile time, Studio will then flag variables that are used but undeclared.

Module-level variables declared outside of any subroutine or function are global to that routine. Variables declared within a subroutine or function are local.

FeedbackOpens in a new window