Control Flow
์์์ ์ดํด๋ณธ ๋ฐ์ ๊ฐ์ด ๋ฌ์คํธ์ ํํ์์ผ๋ก์จ if๋ ๋ ๋ธ๋ก ์ค ํ๋๋ฅผ ์กฐ๊ฑด์ ๋ฐ๋ผ ํ๊ฐ(๋ฐํ)ํ๋ฉฐ, ๋ธ๋ก์ if ํํ์์ ๊ฐ์ด ๋๋ ๊ฐ์ ๊ฐ์ง ์ ์์ต๋๋ค. ๋ค๋ฅธ ํ๋ฆ์ ์ด ํํ์๋ ๋ฌ์คํธ์์ ์ ์ฌํ๊ฒ ์๋ํฉ๋๋ค.
As we have seen,
ifis an expression in Rust. It is used to conditionally evaluate one of two blocks, but the blocks can have a value which then becomes the value of theifexpression. Other control flow expressions work similarly in Rust.