docs.intersystems.com
ObjectScript Tutorial
Storing a String
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

Storing a string on disk, permanently, is just as easy as using regular variables. Just use the ^ (caret) character as the first character of the variable name. The example saves a string in the variable ^x which is different than the regular variable x. Even if you kill all regular variables, ^x remains. We'll discuss this topic in detail soon.

SAMPLES>set x = 4

SAMPLES>set ^x = "Store this on disk"

SAMPLES>kill

SAMPLES>write

SAMPLES>write ^x
Store this on disk
SAMPLES>


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