Interactive programming (repl): Difference between revisions
Content added Content deleted
(→{{header|Arturo}}: Restored latest Arturo solution.) |
Drkameleon (talk | contribs) No edit summary |
||
Line 95: | Line 95: | ||
=> Rosetta::Code |
=> Rosetta::Code |
||
$> |
$></lang> |
||
=={{header|AWK}}== |
|||
<lang AWK> |
|||
# syntax: GAWK -f CON GNU |
|||
# syntax: TAWK Thompson Automation |
|||
</lang> |
|||
<p>Command, program, output:</p> |
|||
<pre> |
|||
GAWK -f CON |
|||
BEGIN { |
|||
x = f("Rosetta","Code",":") |
|||
print(x) |
|||
} |
|||
function f(s1,s2,s3) { return(s1 s3 s3 s2) } |
|||
^Z <-- CTRL-Z |
|||
Rosetta::Code |
|||
</pre> |
|||
<p>Command (followed by welcome banner), program, output:</p> |
|||
<pre> |
|||
TAWK |
|||
TAWK Version 5.0c (for Windows/NT) |
|||
Copyright 1996 Thompson Automation, Inc. All Rights Reserved. |
|||
Enter AWK Program followed by a blank line: |
|||
BEGIN { |
|||
x = f("Rosetta","Code",":") |
|||
print(x) |
|||
} |
|||
function f(s1,s2,s3) { return(s1 s3 s3 s2) } |
|||
<-- blank line |
|||
Enter program arguments, if any: |
|||
<-- blank line |
|||
Rosetta::Code |
|||
</pre> |
|||
=={{header|BASIC}}== |
=={{header|BASIC}}== |