Solidity TutorialsMarch 22, 202517:58• 46 views

Control Flow in Solidity: If-Else, For Loops, and While Loops

Original Channel Title (FA):

if else for while in solidity شرط ها و حلقه ها در قراردادهای هوشمند

Lesson Notes & Description

Control Flow structures in Solidity: If-Else conditions, For loops, and While loops explained. Master logical execution and looping in smart contract development. Learn how conditional branching works, how loops affect gas costs, and how to avoid costly infinite loops on the EVM. ### What You Will Learn: - Syntax and usage of if, else if, and else conditional statements. - Implementing for and while loops safely in contract methods. - Understanding gas consumption and the block gas limit vulnerability with unbounded loops. - Alternatives to loops using off-chain computation and mappings. --- ### 🔗 Official Resources & Community: - 🌐 Official Website: https://cryptocoder.team/en/ - 📢 Telegram Channel: https://t.me/CryptoCoders_tel - 📺 YouTube Channel: https://www.youtube.com/@Crypto_Coders - 📂 GitHub Source Code: https://github.com/CryptoCodersGit/Co #CryptoCoders #Blockchain #Web3 #SolidityTutorials
View Original Persian Description (FA)
برای اینکه کامل تر با زبان برنامه نویسی قراردادهای هوشمند یعنی سالیدیتی اشنا شویم باید با ساختارهای کنترلی Control Structures اشنا شویم ساختارهای کنترلی سالیدیتی شامل: IF - Else - Nested IF Else شروط ایف و الس While - Do While حلقه های دو وایل و وایل For حلقه فور در این آموزش به تمام این موارد به صورت کامل میپردازیم و مثال های عملی را برای تمرین انجام میدهیم بخش بندی ها: 00:00 - مقدمات 00:50 - معرفی Control Structures Solidity 06:00 - بررسی IF Else شروط 08:10 - بررسی For حلقه ها 10:18 - بررسی While حلقه 12:21 - بررسی Do While 14:25 - تست نحوه عملکرد کنترل استراکچرها 17:30 - پایان بندی... همچنین کد این آموزش را میتوانید از گیت هاب کریپتو کدرز بردارید: https://github.com/CryptoCodersGit/Co...

Video Chapters(8 parts)

0:00Introduction & Overview
Play at 0:00
0:50Introduction to Solidity Control Structures
Play at 0:50
6:00IF Else
Play at 6:00
10:18While
Play at 10:18
12:21Do While
Play at 12:21
14:25Testing & Blockchain Execution
Play at 14:25
17:30Conclusion & Next Steps
Play at 17:30

Referenced Resources & Documentation

Topics Covered:#CryptoCoders#Blockchain#Web3#SolidityTutorials
START A CONVERSATION

Have a Web3 Project in Mind?

Let's discuss your requirements. We can help you evaluate technical feasibility, plan architecture, and build the solution.

Zero MiddlemenMulti-Chain AgnosticSecurity-First