Strip block comments: Difference between revisions

Content deleted Content added
m →‎{{header|Java}}: Make clearer by refactoring subtasks into methods
Add Seed7 example
Line 1,129: Line 1,129:
function something() {
function something() {
}</pre>
}</pre>

=={{header|Seed7}}==
<lang seed7>$ include "seed7_05.s7i";

const proc: main is func
local
const string: stri is "\
\ /**\n\
\ * Some comments\n\
\ * longer comments here that we can parse.\n\
\ *\n\
\ * Rahoo\n\
\ */\n\
\ function subroutine() {\n\
\ a = /* inline comment */ b + c ;\n\
\ }\n\
\ /*/ <-- tricky comments */\n\
\\n\
\ /**\n\
\ * Another comment.\n\
\ */\n\
\ function something() {\n\
\ }";
begin
writeln(replace2(stri, "/*", "*/", " "));
end func;</lang>
Output:
<pre>
function subroutine() {
a = b + c ;
}

function something() {
}
</pre>


=={{header|Tcl}}==
=={{header|Tcl}}==