1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-26 01:04:35 +02:00
comprehensive-rust/src/basic-syntax.md

10 lines
335 B
Markdown
Raw Normal View History

2022-12-21 16:36:30 +01:00
# 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` and `while` work the same.
2022-12-21 19:45:02 -05:00
* Variable assignment is done with `=`, comparison is done with `==`.