Caché Basic Tutorial
Storing Data on Disk
[Home] [Back] [Next]
InterSystems: The power behind what matters   

Storing something on disk, permanently, is just as easy as using regular variables. Just place the ^ (caret) character in front of the variable name. The example saves a string in the variable ^x which is different than the regular variable x. We'll discuss this topic in detail soon.

This example will display the current value of ^x before updating it, each time you run it.
x = 4
println "x = ", x
println "old value of ^x = ", ^x
^x = "random number: " & int((rnd()*10))
println "new value of ^x = ", ^x

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA