Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Switch statement, fall-through?

Dikenal juga sebagai: switch statement · fall-through

Definition 2.8 University Computer Science — Year 1 · Bab 2 — C: Types, Operators and Control Flow

A switch statement, written with switch, evaluates an integer expression and jumps to the case label with that value, or to default. Execution then continues downwards through the following labels until a break: passing from one case into the next is called fall-through.

The switch of days_in as jumps. The value of month selects an entry point; without a break the thirty-day case runs on into default, which overwrites 30 with 31.
The switch of days_in as jumps. The value of month selects an entry point; without a break the thirty-day case runs on into default, which overwrites 30 with 31.
Baca dalam konteks →