You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IsaacShelton edited this page Mar 21, 2022
·
1 revision
Fallthrough
The fallthrough keyword is used inside switch statements to fall though into the next block
switch animal_kind {
case AnimalKind::CAT
if animal_sub_kind != AnimalSubKind::TIGER {
fallthrough
}
print("The animal is a tiger")
case AnimalKind::DOG
print("The animal is a cat or dog")
}