Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Variables

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

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 tab