Rust Tutorial #7 - Conditions and Control Flow (if/else if/else)

preview_player
Показать описание
Hello everybody and welcome to video number seven in this Rust Programming tutorial series. In this video I will be going over conditions, compound conditions, and control flow so if elseif and else. I know many of you are already familiar with these topics or most likely you've seen other programming languages before, so I will go relatively quickly and just show you the core operators and syntax and all that. Enjoy!

⭐️ Timestamps ⭐️
00:00 | Introduction
00:48 | Conditions
03:04 | Compound Conditions
06:34 | Control Flow

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
-Tech With Tim
-Rust
-Rust Programming Language
-How To Code with Rust
-Rust Coding Tutorial
-Rust Not The Game

⭐️ Hashtags ⭐️
#TechWithTim #Rust #Programming
Рекомендации по теме
Комментарии
Автор

finally! I have been waiting for this video for a week. Thanks for introducing Rust to us and making our lives easier.

ohwow
Автор

Not me coming from a c, javascript background where we have and, or as &&, || respectively and actually enjoying this.

ezra
Автор

You should talk about the "match" statement for flow of control. It's how I've seen most real-world rust programs work:

fn main() {
let food = "cookie";

match food {
"cookie" => println!("Yummy cookie"),
"bread" => println!("boring"),
_=> println!("that's too bad")
}

mjshulman
Автор

Thanks so much for helping me how to program on rust! I hope you will feel the greatest soon :)

realcatlive
Автор

Very very similar to Action Scripts. Same format almost 100% the same. Love it! Super easy to transition from that if you have experience with AS3.

InteractiveDNA
Автор

videos are terrific, thx! The background music is a bit distracting tho.

donkelly
Автор

Thanks so much for always releasing free great educational content!

logvoid
Автор

I am a bit confused by the conditions example (2:00). You compare 2(which is an f32) and 2.2(which, by default, is an f64), so shouldn't this throw an error?

leopietsch
Автор

Really great videos, you have a new subscriber.
One question though, at 9:37 you missed a colon at the else if statements, but the compiler didn't complained, why is that?

mariofix
Автор

Tim can you collab with Tiff in Tech. I asked her this question and she said she took one of your tutorials awhile ago.

pravachanpatra
Автор

What is the font that you use Tim? I really like how "fn", "let", and "f32" look different than the rest of the code.

raashidansari
Автор

Every time you forget a semicolon I die a little inside. I’m like “you can do, you can learn!”

georgemcwilliams
Автор

Does Rust have an "excluse or" operator?

kenholt
Автор

How to I use the input command with if else if and else? I had a problem of only else being printed and every word and indent is correct

bhavjeetsinghmoyal
Автор

Question... Is rust like so many other C-inspired languages, where rust doesn't really care if the brackets are lined up like I prefer or, what feels to me like off-balance and hard to read(I'm sure it's only b/c I'm not used to it though) on separate columns??

kjlw
Автор

I noticed that some statements have no terminating semi-colon. Is the semicolon only for let statements?

lsatenstein
Автор

Else if is so yukkie!!! Avoid an else if! Either use guard clauses or in rust you can use the match block

CallousCoder
Автор

Lack of parenthesis in keywords like (if for while) is really stupid

n.m
Автор

rust is SUPPEERRR similar to C#. noice, only thing thats annoying is C# has lists and rust doesnt? which makes the rust rules on arrays kinda gey...

Keolamation