メインコンテンツまでスキップ
バージョン:25.3

[ ] (square brackets)

Used to Enclose Lists (Added in SenseTalk 1.60)

Examples:

set colors to ["orange", "grey", "violet"]
set scores to [] -- an empty list
ノート

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

This syntax is for sending a function message to an object. Although not generally well known, SenseTalk supports this syntax, similar to Objective-C.

Example:

put [Tasks getTop]

Used Around Tokens in Date/Time Format Strings Added in SenseTalk 1.91

Example:

put formattedTime("[month name] [day], [year] [hr]:[mi]:[se]") --> October 15, 2021 10:57:04