square brackets
-
used to enclose lists
-
new in 1.60
-
Examples:
set colors to ["orange", "grey", "violet"]
set scores to [] -- an empty list
-
Note: SenseTalk is very accommodating about the brackets used for collections, allowing any of ( ), [ ], or around both lists and property lists. However, it is strongly encouraged to always use for property lists, and [ ] for lists.
-
-
square-bracket syntax for sending a function message to an object
-
although not generally well known, SenseTalk supports this syntax, similar to Objective-C
-
Examples:
put [Tasks getTop]
-
-
used around tokens in date/time format strings
-
new in 1.91
-
Examples:
put formattedTime("[month name] [day], [year] [hr]:[mi]:[se]") --> October 15, 2021 10:57:04
-