Interactive programming (repl): Difference between revisions

no edit summary
(Added Quackery.)
No edit summary
Line 76:
 
=={{header|Arturo}}==
<lang rebol>➜ $ arturo
In Arturo's REPL:
<lang arturo>$ :001> f: @(a b sep) -> a + 2*sep + b
= <function>
$ :002> f "Rosetta" "Code" ":"
= "Rosetta::Code"</lang>
 
Arturo
=={{header|AWK}}==
(c) 2019-2021 Yanis Zafirópulos
<lang AWK>
 
# syntax: GAWK -f CON GNU
# v/0.9.6.5 b/1097 @ 2021-02-09T16:40:43+01:00
# syntax: TAWK Thompson Automation
# arch: amd64/macosx
</lang>
 
<p>Command, program, output:</p>
# Type info 'symbol for info about a specific symbol or built-in function
<pre>
# Type help to get a list of all available functions with a short description
GAWK -f CON
# For multi-line input, just add a blank space at the end of a line
BEGIN {
 
x = f("Rosetta","Code",":")
# Launching interactive console - rock on! 🤘
print(x)
 
}
$> f: function [x y sep]-> x ++ (repeat sep 2) ++ y
function f(s1,s2,s3) { return(s1 s3 s3 s2) }
 
^Z <-- CTRL-Z
$> f "Rosetta" "Code" "::Code"
$ :002=> f "Rosetta" "::Code" ":"
</pre>
 
<p>Command (followed by welcome banner), program, output:</p>
$> </lang AWK>
<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}}==
1,532

edits