C.Plus.Plus.Primer.4th.Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

C.Plus.Plus.Primer.4th.Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Chapter 6. Statements


CONTENTS

Section 6.1 Simple Statements

192

Section 6.2 Declaration Statements

193

Section 6.3 Compound Statements (Blocks)

193

Section 6.4 Statement Scope

194

Section 6.5 The if Statement

195

Section 6.6 The switch Statement

199

Section 6.7 The while Statement

204

Section 6.8 The for Loop Statement

207

Section 6.9 The do while Statement

210

Section 6.10 The break Statement

212

Section 6.11 The continue Statement

214

Section 6.12 The goto Statement

214

Section 6.13 try Blocks and Exception Handling

215

Section 6.14 Using the Preprocessor for Debugging

220

Chapter Summary

223

Defined Terms

223

Statements are analogous to sentences in a natural language. In C++ there are simple statements that execute a single task and compound statements that consist of a block of statements that execute as a unit. Like most languages, C++ provides statements for conditional execution and loops that repeatedly execute the same body of code. This chapter looks in detail at the statements supported by C++.

flow-of-control statements that allow statements to be executed conditionally or repeatedly. The if and switch statements support conditional execution. The for, while, and do while statements support repetitive execution. These latter statements are often referred to as loops or iteration statements.


/ 199