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

repeated

Operator

The repeated operator creates a string of text repeated a given number of times, up to a specified length, or creates a repeated list.

Example:

put "$" repeated 12 times --> "$$$$$$$$$$$$"
put "Hello" repeated to length 12 --> "HelloHelloHe"

For a list of repeated items, use as list/as a list or list of/a list of with repeated.

Example:

put "$" repeated 6 times as a list --> ("$","$","$","$","$","$")
put a list of 7 repeated 3 times --> (7,7,7)

When the repetition count is a literal number (not a value stored in a variable) and the value to be repeated is not a number or a list, the <literalNumber> of syntax can also be used, or the <literalNumber> of <x> as a list can be used with any type of value.

Example:

put five of "#" --> "#####"
put five of "#" as a list --> ("#","#","#","#","#")

History

  • Added in SenseTalk 1.67