mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-24 15:29:28 +02:00
335 B
335 B
Basic Syntax
Much of the Rust syntax will be familiar to you from C or C++:
- Blocks and scopes are delimited by curly braces.
- Line comments are started with
//
, block comments are delimited by/* ... */
. - Keywords like
if
andwhile
work the same. - Variable assignment is done with
=
, comparison is done with==
.