请输入您要查询的单词:

 

单词 fall-through
释义

fall-through

See also: fallthrough and fall through

English

Noun

fall-through (plural fall-throughs)

  1. (programming) In certain programming constructs, the situation where execution passes to the next condition in a list unless explicitly redirected.
    • 1997, Bjarne Stroustrup, The C++ Programming Language: Language Libraries and Design
      It is a good idea to comment the (rare) cases in which a fall-through is intentional so that an uncommented fall-through can be assumed to be an error.
    • 2001, Graham M Seed, Barry J Cooper, An Introduction to Object-Oriented Programming in C++
      If you place default elsewhere, then a break will be required to prevent fall-through.
    • 2008, Nagel et al, Professional C# 2008
      Specifically, it prohibits fall-through conditions in almost all cases.

switch (x) {
case 1:
    printf("Printed when x=1");
    break;
case 2:
    printf("Printed when x=2");
case 3:
    printf("Printed when x=2 or x=3");
    break;
}

A case statement in the C programming language containing a fall-through. Because the second case has no "break" at the end, execution will "fall through" to the third case.

Anagrams

  • throughfall
随便看

 

国际大辞典收录了7408809条英语、德语、日语等多语种在线翻译词条,基本涵盖了全部常用单词及词组的翻译及用法,是外语学习的有利工具。

 

Copyright © 2004-2023 idict.net All Rights Reserved
京ICP备2021023879号 更新时间:2024/8/1 19:23:09