2016-02-13 173 views
2

Julia REPL根據我的終端窗口大小截斷輸出。例如,在一個10行高的窗口,我得到下面的輸出:如何防止REPL截斷輸出?

julia> collect(1:50) 
50-element Array{Int64,1}: 
    1 
    2 
    3 
    ⋮ 
49 
50 

julia> 

我怎樣才能使REPL從截斷輸出這樣嗎?

回答

3

的一種方法,是用命令repr(它示出了該結果作爲一個字符串):

julia> repr(collect(1:50)) 
"[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, 
30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]" 

的另一種方法,是用命令show

julia> show(collect(1:50)) 
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,3 
0,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50] 

與朱莉婭版測試0.4.3