Run-length encoding: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: added wording to the REXX section header. |
|||
Line 2,166:
integer, parameter :: bufsize = 100 ! Sets maximum size of coded and decoded strings, adjust as necessary
character(bufsize) :: teststr = "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW"
character(bufsize) :: codedstr = "",
call Encode(teststr, codedstr)
Line 2,235 ⟶ 2,221:
end subroutine
end program</lang>
Output:
<pre>
12W1B12W3B24W1B14W
WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
</pre>
=={{header|FreeBASIC}}==
|