42 lines
993 B
Text
42 lines
993 B
Text
*char q=
|
|
"proc main() void:\r\n"
|
|
" [128]char l;\r\n"
|
|
" char ch;\r\n"
|
|
" channel input text qc, lc;\r\n"
|
|
" open(qc, q);\r\n"
|
|
" writeln(\"*char q=\");\r\n"
|
|
" while readln(qc; &l[0]) do\r\n"
|
|
" write('\"');\r\n"
|
|
" open(lc, &l[0]);\r\n"
|
|
" while read(lc; ch) do\r\n"
|
|
" if ch='\"' or ch='\\\\' then write('\\\\') fi;\r\n"
|
|
" write(ch)\r\n"
|
|
" od;\r\n"
|
|
" close(lc);\r\n"
|
|
" writeln(\"\\\\r\\\\n\\\"\")\r\n"
|
|
" od;\r\n"
|
|
" close(qc);\r\n"
|
|
" writeln(';');\r\n"
|
|
" writeln(q)\r\n"
|
|
"corp\r\n"
|
|
;
|
|
proc main() void:
|
|
[128]char l;
|
|
char ch;
|
|
channel input text qc, lc;
|
|
open(qc, q);
|
|
writeln("*char q=");
|
|
while readln(qc; &l[0]) do
|
|
write('"');
|
|
open(lc, &l[0]);
|
|
while read(lc; ch) do
|
|
if ch='"' or ch='\\' then write('\\') fi;
|
|
write(ch)
|
|
od;
|
|
close(lc);
|
|
writeln("\\r\\n\"")
|
|
od;
|
|
close(qc);
|
|
writeln(';');
|
|
writeln(q)
|
|
corp
|