Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Julia

You're reading from  Mastering Julia

Product type Book
Published in Jul 2015
Publisher
ISBN-13 9781783553310
Pages 410 pages
Edition 1st Edition
Languages

Basic I/O


Julia views its data in terms of a byte stream. If the stream comes from a network socket or a pipe, it is essentially asynchronous but the programmer need not be aware of this as the stream will be blocked until cleared by an I/O operation.

The primitives are the read() and write() functions which deal with binary I/O. When dealing with formatted data, such as text, a number of other functions are layered on top of these.

Terminal I/O

All streams in Julia have at least a read and a write routine. These take a Julia stream object as their first argument. In common with most systems, Julia defines three special terminal streams: standard-in (STDIN), standard-out (STDOUT) and standard-error (STDERR). The first is read-only and the latter two, write-only.

The special streams are provided by calls to the Julia API (libjulia) that links to the underlying operating system. Their definitions –– in terms of ccalls() –– along with the functions to operate on them, are part of the Base::streams...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}