Share Object

Top  Previous  Next

Allows you to save values that can be accessed by any running script.

Description

The Share object allows you to save values that can be accessed by any running script. This memory is lost on reset or power cycle. Any type of value may be stored, and the number of values is only limited by total system memory.

 

You access values in the Share object using the member reference operators . and []. To create a new member, simply assign it a value, as shown in the examples. Referencing a member that does not exist creates a new member with that name, initialized to undefined. Assigning undefined to an existing member deletes it from the object and recovers the memory it was using.

Examples

Share["maxTemps"] = [85, 90, 95];// array
Share.deviceName = "My WebCell";// string