Working with Output
You may already be familiar with STDOUT, or standard output, if you’ve worked with scripting languages like Perl, Python, or Ruby. In fact, we’ve already used it in the Systems Programming in the Twenty-First Century. The “system console” that Scala’s println writes to is none other than STDOUT. We can access it directly by importing Scala Native’s stdio object, which includes the standard file descriptors as well as the C functions that we’ll need to make use of them.
Introducing printf
Throughout this book, when I introduce a new function I’ll present its signature and then discuss its inputs, outputs, and effects. Most of the functions I’ll present are provided by the operating system or the C standard library. In any ...
Get Modern Systems Programming with Scala Native now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.