What should I do to display all contents in Julia?

Hello Everyone,

Is there a command like “More on/off” in MATLAB.

I use REPL console under Julia-cliant0.6.13 in Atom.

When we refer contents of long variable, for simple example, x = rand(30,1) makes 30 x 1 array.

In the console(REPL), then return “x”, it is omitted in contents of “x” in the middle as a default.

What should I do to display all contents in REPL of Julia like a “More off” Matlab command ?

1 Like

showall(x)

1 Like

thank you brea,

Using “showall” and “show” is not display row style.
I want to let it display it in variable same form if it all possible.

show(STDOUT, "text/plain", x)

The function that is called, when just typing x in the REPL is here. One could hack this to optionally have show(IOContext(io, :limit => false), mime, x).

Oh, you are genius !

I understood it well very much.

Internal function of the REPL module change “true” into “false”.

This method was saved me very much because it did not appear in various manuals.

Thank you very much, jbrea !

( “moreon/off( )” in Julia, I think that it would be convenient if such a function :slight_smile: )

While this could be handy in interactive use, it would require a global state, which would complicate a lot of other things (eg reproducibility, testing, threads, …). Generally, global states are avoided if possible for these reasons.

Having this implemented with IOContext with an easily accessible API is probably a better solution.

Thank you your advice !

I see that a design of global states have complicated issue.

I’ve been looking forward to your lesson.