RosettaCodeData/Task/Interactive-programming/00DESCRIPTION

23 lines
865 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
Many language implementations come with an ''interactive mode''.
2013-04-10 21:29:02 -07:00
2016-12-05 22:15:40 +01:00
This is a [[wp:command-line interpreter|command-line interpreter]] that reads lines from the user and evaluates these lines as statements or expressions.
2013-04-10 21:29:02 -07:00
2016-12-05 22:15:40 +01:00
An interactive mode may also be known as a ''command mode'',   a ''[[wp:read-eval-print loop|read-eval-print loop]]'' (REPL),   or a ''shell''.
2013-04-10 21:29:02 -07:00
2016-12-05 22:15:40 +01:00
;Task:
Show how to start this mode.
Then, as a small example of its use, interactively create a function of two strings and a separator that returns the strings separated by two concatenated instances of the separator &nbsp; (the 3<sup>rd</sup> argument).
;Example:
<big> f('Rosetta', 'Code', ':') </big>
should return
<big> 'Rosetta::Code' </big>
;Note:
This task is &nbsp; ''not'' &nbsp; about creating your own interactive mode.
<br><br>