Anonymous user
Execute CopyPasta Language: Difference between revisions
m
→{{header|Nanoquery}}
No edit summary |
|||
Line 181:
=={{header|Nanoquery}}==
<lang Nanoquery>// a function to handle fatal errors
def fatal_error(
println "%" +
println "usage: " +
exit
end
// get a filename from the command line and read the file in
try
catch
fatal_error("error while trying to read from specified file")
end
// convert the source to lines of code
// a variable to represent the 'clipboard'
// loop over the lines that were read
while (
// check which command is on this line
try
if (
else if ($command = "CopyFile")
if (
else
end
else if (
else if (
println
exit
else
fatal_error("unknown command '" +
end
catch
fatal_error("error while executing command '" +
end
// increment past the command and the next line
end</lang>
|