RosettaCodeData/Task/String-interpolation-included-/SenseTalk/string-interpolation-includ...

8 lines
302 B
Plaintext

put "little" into x
put "Mary had a [[x]] lamb." -- this is a literal string
put !"Mary had a [[x]] lamb." -- this is an interpolated string
put
put !"[[repeat with n=2 to 6]]Mary had [[n]] [[x]] lambs.[[return]][[end repeat]]"
put !"Mary had [[repeat with n=2 to 6]][[n]] [[x]] [[end repeat]]lambs."