January 2019
Intermediate to advanced
246 pages
5h 23m
English
The following notation conventions are used throughout the book.
A # => precedes the output or results of executing a code snippet.
| | p 2 + 2 # => 4 |
In order to keep code short, we’ll sometimes omit the p, puts or print in the book like this:
| | 2 + 2 # => 4 |
The Crystal Playground environment (see Working with Crystal Playground) shows the values and types of all expressions, so you don’t need to tell the program explicitly to print. Use p, puts, or print, however, to produce output in another editor or IDE.
Some code files contain lines that compile into an error. This is on purpose because errors can be very educational. Examining these error messages carefully gives you a good indication of what went wrong, ...
Read now
Unlock full access