2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,7 +1,22 @@
|
|||
Many language implementations come with an ''interactive mode''. This is a [[wp:command-line interpreter|command-line interpreter]] that reads lines from the user and evaluates these lines as statements or expressions. 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''.
|
||||
Many language implementations come with an ''interactive mode''.
|
||||
|
||||
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.
|
||||
This is a [[wp:command-line interpreter|command-line interpreter]] that reads lines from the user and evaluates these lines as statements or expressions.
|
||||
|
||||
For example, <tt>f('Rosetta', 'Code', ':')</tt> should return <tt>'Rosetta::Code'</tt>
|
||||
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''.
|
||||
|
||||
Note: this task is not about creating your own interactive mode.
|
||||
|
||||
;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 (the 3<sup>rd</sup> argument).
|
||||
|
||||
|
||||
;Example:
|
||||
<big> f('Rosetta', 'Code', ':') </big>
|
||||
should return
|
||||
<big> 'Rosetta::Code' </big>
|
||||
|
||||
|
||||
;Note:
|
||||
This task is ''not'' about creating your own interactive mode.
|
||||
<br><br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue