I’m unable to properly accept user input from the terminal in VS Code.
- I have a file called
asking-for-user-input.jl, that has the following code:
function main() println("Enter your first name:") first_name = readline() println("Your first name is $first_name") end main()
- I right click on the file and select
Julia:Execute File in REPL.
- It opens and prompts for input, but does this:
Enter your first name: julia> Svetlana Your first name is ERROR: UndefVarError: Svetlana not defined
It seems this has occurred before with Juno, is their anyway to fix this problem?
It doesn’t seem to have a problem accepting and working with numbers, just strings.