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

asList

Function, Special Function Message / Property of Objects

Syntax:
{the} asList of factor
asList( expr )
objectOrValue as {a} list

ノート

The asList( objectOrValue ) function is more often called using the special syntax objectOrValue as {a} list.

When the target is an object which has an asList property, the value of that property is used. If the object has an asListExpression property, the value of that property is evaluated as an expression (equivalent to calling the value() function) to obtain the list value. If the object has neither of these properties, an asList function message is sent exclusively to the object and its helpers.

If the target is not an object (and is not already a list), the target's text string value is evaluated as an expression to obtain the list value. If the text string evaluation doesn't produce a list, the result is a single-item list containing the original value as the sole item in the list.

Example:

put 23 as a list into mylist
put myList --> [23]
insert 24 after mylist
put mylist --> [23,24]

Further Reading

Resources in our other reference manuals.

Related terms in the SenseTalk Dictionary.

ノート

Added in SenseTalk 1.30.