RosettaCodeData/Task/String-interpolation-included-/M2000-Interpreter/string-interpolation-included-.m2000
2023-07-01 13:44:08 -04:00

13 lines
528 B
Text

module checkit {
size$="little"
m$=format$("Mary had a {0} lamb.", size$)
Print m$
Const RightJustify=1
\\ format$(string_expression) process escape codes
Report RightJustify, format$(format$("Mary had a {0} {1} lamb.\r\n We use {0} for size, and {1} for color\r\n", size$, "wh"+"ite"))
\\ we can use { } for multi line string
Report RightJustify, format$({Mary had a {0} {1} lamb.
We use {0} for size, and {1} for color
}, size$, "wh"+"ite")
}
checkit