Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
42
Task/Quine/Draco/quine.draco
Normal file
42
Task/Quine/Draco/quine.draco
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
*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
|
||||
Loading…
Add table
Add a link
Reference in a new issue