0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Julia Text I/O writeとprint

Last updated at Posted at 2018-12-04

私はプログラミング初心者なので,テキストファイルとバイナリファイルの違いも知りませんでした(笑).

1 writeはバイナリ出力

例1-1

julia> write(stdout, [1,2,3]);

バイナリ出力なので返り値なし.

例1-2

julia> write(stdout, "hello");
hello

2 printはテキスト出力

例2-1

julia> print(stdout, [1,2,3]);
[1, 2, 3]

例2-2

julia> print(sdtout, "hello");
ERROR: UndefVarError: sdtout not defined
Stacktrace:
 [1] top-level scope at none:0

ちなみに

セミコロンがないと,

julia> write(stdout, "hello")
hello5
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?