Anonymous user
Split a character string based on change of character: Difference between revisions
Split a character string based on change of character (view source)
Revision as of 21:09, 9 November 2018
, 5 years agono edit summary
m (moved ANSI BASIC to it's proper place alphabetically.) |
No edit summary |
||
Line 660:
{{Out}}
<pre>g, HHH, 5, YY, ++, ///, \</pre>
=={{header|IS-BASIC}}==
<lang IS-BASIC>100 LET S$="gHHH5YY++///\"
110 PRINT S$(1);
120 FOR I=2 TO LEN(S$)
130 IF S$(I)<>S$(I-1) THEN PRINT ", ";
140 PRINT S$(I);
150 NEXT
160 PRINT</lang>
=={{header|J}}==
|