RosettaCodeData/Task/Repeat-a-string/PL-I/repeat-a-string.pli

12 lines
212 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
/* To repeat a string a variable number of times: */
s = repeat('ha', 4);
/* or */
2013-04-10 23:57:08 -07:00
s = copy('ha', 5);
/* To repeat a single character a fixed number of times: */
s = (5)'h'; /* asigns 'hhhhh' to s. */