查询
1 词典释义:
elif
时间: 2024-12-28 19:05:20

艾列弗

双语例句
  • The elif statement is very convenient.

    elif语句非常方便。

  • Possessed: Adventures with Russian Books and the People Who Read Them. By Elif Batuman.

    《着魔:与俄国著作及其读者一起历险》,艾丽芙•巴图曼著。

  • And then it has a strange thing called ELIF, which is simply short for else/if in a second test.

    然后代码做了一个奇怪的,叫做ELIF的事情,也就是else/if的简写,这是第二个测试。

  • The result is an else if statement, which is shortened to elif, as demonstrated in Listing 6.

    结果是一个else if语句,简写为elif,如清单6所示。

  • This example includes only one elif statement, but in practice you can include as many as the program needs.

    本例只包含一个 elif 语句,而实际中可根据程序需要包含任意多个。

  • The above "elif" form will consecutively test each condition and execute the action corresponding to the first true condition.

    以上“ elif ”形式将连续测试每个条件,并执行符合第一个真条件的操作。

  • You can also build more complex conditional tests using an if/elif/else (elif being the equivalent to PHP's elseif), as shown in Listing 8.

    您还可以使用 if/elif/else(elif,等价于 PHP 中的 elseif)创建更加复杂的条件测试,如清单 8 所示。

  • Although it isn't the optimal solution, multiple elif statements can be used to mimic the switch case statement present in some other languages.

    尽管它不是最优的解决方案,但是多个elif语句可以用于模拟其他一些语言中的switch case语句。

  • The expression used in the if statement (and in the elif clause and the while loop discussed later in this article) can be as complex as necessary.

    if语句(以及本文后面讨论的elif子句和while循环)中的表达式可以很复杂。

  • If none of the conditions are true, it will execute the "else" action, if one is present, and then continue executing lines following the entire "if, elif, else" statement.

    如果没有条件为真,则将执行“ else ”操作,如果有一个条件为真,则继续执行整个“ if, elif, else ”语句之后的行。

  • However, generic functions are much better; generic functions will order themselves from more to less specific so there is no question of putting an elif in the wrong place.

    然而,使用通用函数会更好;通用函数自己就会有些或多或少的特性,因此不会在错误的地方使用elif。