rosettaify.frink

View or download rosettaify.frink in plain text format


/** This is a simple program that makes it easier to upload programs and their
    output to Rosetta Code:
    https://rosettacode.org/

    It takes at least one argument (the Frink program name) and runs the
    program and prints its output and formats it all in Rosetta-Code-friendly
    tags.  If more than the Frink program name are given as arguments, the
    remaining arguments are passed to the Frink program.

    It assumes that there is a program named "frink" in your path that runs
    Frink programs.
*/


use Processes.frink

file = ARGS@0

text = read[filenameToURL[file]]

println["""=={{header|Frink}}==
<lang frink>$text</lang>"""]

println["""{{out}}
<pre>"""]

out = execLines["frink $file " + join[" ", rest[ARGS]]]
for line = out
   println[line]

println["""</pre>"""]


View or download rosettaify.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 19100 days, 7 hours, 57 minutes ago.