Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julia request user input from script

Tags:

julia

How do I request user input from a running script in Julia? In MATLAB, I would do:

result = input(prompt) 

Thanks

like image 393
ejang Avatar asked Jul 05 '13 01:07

ejang


People also ask

How do you take user input in Julia?

Reading user inputs from console in Julia can be done through inbuilt I/O methods like : readline() readlines()

How do you input an array in Julia?

An Array in Julia can be created with the use of a pre-defined keyword Array() or by simply writing array elements within square brackets([]). There are different ways of creating different types of arrays.


1 Answers

The easiest thing to do is readline(stdin). Is that what you're looking for?

like image 179
John Myles White Avatar answered Sep 25 '22 17:09

John Myles White