You are asking for a return value of type "Int", but have typed in the
character "1". Try instead:
x=chomp(readline(STDIN))
On Sat, May 23, 2015 at 7:31 PM paul analyst <[email protected]> wrote:

> What wrong ? after typing "1" var = 939577809079766321
> (one ENTER is to small )
>
> julia> println("type any digit and ENTER");x=read(STDIN,Int)
> type any digit and ENTER
> 1
>
> 939577809079766321
> julia>
>
> julia> x
> 939577809079766321
>
> julia> println("type any digit and ENTER");x=read(STDIN,Int64)
> type any digit and ENTER
> 1
>
>
>
> 939577809079766321
>
>
> Paul
>
>
> W dniu sobota, 23 maja 2015 13:02:54 UTC+2 użytkownik paul analyst napisał:
>>
>> How to stop the program and enter the value of the variable from the
>> keyboard (by user)?
>> in other words:
>> How to choose variants of the program with the keyboard?
>>
>> for example:
>>
>> a=zeros(10);
>> for i=1:10
>> x=rand(1);y=rand(1)
>> if x[].>y[] a[i]=x[]
>> else a[i]=SOMTHIG FROM KEYBOARD (USER DECISION)
>> end
>>
>> Paul
>>
>

Reply via email to