A useful technique to define compound variables is
/* stem with the WPS objects to create */ j = 0 objects.0 = j j = j + 1 /* use the index "CodeServerStemEntry" v1.80 */ /* for reference to this entry v1.80 */ CodeServerStemEntry = j /* v1.80 */ objects.j.__class = "WPFolder" objects.j.__title = ServerName || "^CodeServer" j = j + 1 objects.j.__title = "Start the ^CodeServer" || ServerName objects.j.__class = "WPProgram" j = j + 1 objects.j.__title = "Stop the ^CodeServer" || ServerName objects.j.__class = "WPProgram" j = j + 1 objects.j.__title = "Status the ^CodeServer" || ServerName objects.j.__class = "WPProgram" objects.0 = j /* access the entry for the folder v1.80 */ FolderTitle = objects.CodeServerStemEntry.__title /* v1.80 */
This technique makes it possible to insert and delete further elements without changing the index for the other elements. (see also Using "open" compound variables)