| ... | @@ -312,7 +312,7 @@ pub fn main() !void { | ... | @@ -312,7 +312,7 @@ pub fn main() !void { |
| 312 | <p> | 312 | <p> |
| 313 | In Zig, the standard output stream's <code>print</code> function is allowed to fail because | 313 | In Zig, the standard output stream's <code>print</code> function is allowed to fail because |
| 314 | it is actually a function defined for a generic output stream. Consider a generic output stream that | 314 | it is actually a function defined for a generic output stream. Consider a generic output stream that |
| 315 | represents writing data to a file and the disk is full; a write to the file will fail. However, | 315 | represents writing data to a file. When the disk is full, a write to the file will fail. However, |
| 316 | we typically do not expect writing text to the standard output stream to fail. To avoid having | 316 | we typically do not expect writing text to the standard output stream to fail. To avoid having |
| 317 | to handle the failure case of printing to a standard output, you can use alternate functions: the | 317 | to handle the failure case of printing to a standard output, you can use alternate functions: the |
| 318 | <code>std.log</code> function for proper logging or the <code>std.debug.print</code> function. | 318 | <code>std.log</code> function for proper logging or the <code>std.debug.print</code> function. |