Title here
Summary here
Crystal has various value types including strings, integers, floats, booleans, etc. Here are a few basic examples.
To run the program, save it in a file with a .cr
extension and use the crystal
command:
Crystal is a compiled language, but it also provides a way to run scripts directly. For larger programs, you might want to compile them into binaries:
This demonstrates basic value types and operations in Crystal. The syntax is quite similar to Ruby, but with static typing. Notice how Crystal uses string interpolation (#{...}
) for embedding expressions inside strings, which is a convenient feature for formatting output.