When and where should we use semicolon

Not only that: it can act as a separator between expressions:

julia> (a = 1; b = 2; c = a+b; c)
3

and syntax for hcat:

[1 2;
 3 4]

Suppressing output is primarily for interactive use, it is rarely ever seen it in code, because in idiomatic Julia, most code is inside functions. The exception could be a script which produces results that print something large and unnecessary.

8 Likes