mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-23 04:06:47 +08:00
Two typos and a minor correction. (#16)
This commit is contained in:
parent
93389b13dc
commit
e03f9de15b
3 changed files with 9 additions and 6 deletions
|
|
@ -60,9 +60,9 @@ The `endl` is doing two things for you:
|
||||||
1. Of course, it's giving you a new line but it is also...
|
1. Of course, it's giving you a new line but it is also...
|
||||||
2. Triggers the output to actually render on your console
|
2. Triggers the output to actually render on your console
|
||||||
|
|
||||||
Actual output via streams like `cout` and `cerr` only happens
|
Actual output via streams like `cout` only happens when new lines are
|
||||||
when new lines are emitted. This is called "buffering". Buffering is
|
emitted. This is called "buffering". Buffering is a powerful technique
|
||||||
a powerful technique to increase efficiency when:
|
to increase efficiency when:
|
||||||
|
|
||||||
* the amount of output is a little at a time
|
* the amount of output is a little at a time
|
||||||
|
|
||||||
|
|
@ -87,7 +87,10 @@ The choice of the method name `flush()` is apropos in that you're
|
||||||
"flushing" any buffered characters all the way to their ultimate end
|
"flushing" any buffered characters all the way to their ultimate end
|
||||||
point.
|
point.
|
||||||
|
|
||||||
Note that `cout` can be replaced with the name of any output stream.
|
Note that `cout` can be replaced with the name of any output stream. Though
|
||||||
|
observe that its counterpart `cerr`, which is intended for diagnostics and
|
||||||
|
error reporting, does not use a buffer so that important messages are reported
|
||||||
|
immediately. As a result, there is never any need to call `cerr.flush()`.
|
||||||
|
|
||||||
## Forcing Output In Assembly Language
|
## Forcing Output In Assembly Language
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ Equation: 1 x 2^0 1 x 2^0
|
||||||
```
|
```
|
||||||
|
|
||||||
On the line marked "Value" you can see the values represented as double precision
|
On the line marked "Value" you can see the values represented as double precision
|
||||||
and as single precious. Under "Comment" you can see that there
|
and as single precision. Under "Comment" you can see that there
|
||||||
is no difference between the double and the single precision numbers. Remember
|
is no difference between the double and the single precision numbers. Remember
|
||||||
the key thing about floating point numbers: they are approximations. Sometimes,
|
the key thing about floating point numbers: they are approximations. Sometimes,
|
||||||
as in the case of whole numbers like 1, the approximation is exact. When there
|
as in the case of whole numbers like 1, the approximation is exact. When there
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ size of data structures in memory and on disc.
|
||||||
|
|
||||||
## Space Versus Time
|
## Space Versus Time
|
||||||
|
|
||||||
In Computer Science there is an eternal between space and time. The
|
In Computer Science there is an eternal tension between space and time. The
|
||||||
following is a **law**:
|
following is a **law**:
|
||||||
|
|
||||||
*If you want something to go faster, it will cost more memory.*
|
*If you want something to go faster, it will cost more memory.*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue