Jump to content

Split a character string based on change of character: Difference between revisions

m
→‎{{header|ALGOL 68}}: Remove unnecessary "Works with" and unused variable
(→‎K: add)
m (→‎{{header|ALGOL 68}}: Remove unnecessary "Works with" and unused variable)
Line 283:
 
=={{header|ALGOL 68}}==
{{works with|ALGOL 68G|Any - tested with release 2.8.3.win32}}
<syntaxhighlight lang="algol68">BEGIN
# returns s with ", " added between each change of character #
Line 295 ⟶ 294:
[ 3 * ( ( UPB s - LWB s ) + 1 ) ]CHAR result;
INT r pos := LWB result;
INT s pos := LWB s;
CHAR s char := s[ LWB s ];
FOR s pos FROM LWB s TO UPB s DO
3,044

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.