We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Base.prompt
1 parent 0cb31a5 commit 39e777bCopy full SHA for 39e777b
base/util.jl
@@ -293,6 +293,16 @@ is encountered or EOF (^D) character is entered on a blank line. If a `default`
293
then the user can enter just a newline character to select the `default`.
294
295
See also `Base.getpass` and `Base.winprompt` for secure entry of passwords.
296
+
297
+# Example
298
299
+```julia-repl
300
+julia> your_name = Base.prompt("Enter your name");
301
+Enter your name: Logan
302
303
+julia> your_name
304
+"Logan"
305
+```
306
"""
307
function prompt(input::IO, output::IO, message::AbstractString; default::AbstractString="")
308
msg = !isempty(default) ? "$message [$default]: " : "$message: "
0 commit comments