RosettaCodeData/Task/Repeat-a-string/OxygenBasic/repeat-a-string.basic

19 lines
320 B
Plaintext

'REPEATING A CHARACTER
print string 10,"A" 'result AAAAAAAAAA
'REPEATING A STRING
function RepeatString(string s,sys n) as string
sys i, le=len s
if le=0 then exit function
n*=le
function=nuls n
'
for i=1 to n step le
mid function,i,s
next
end function
print RepeatString "ABC",3 'result ABCABCABC