The case statement is another conditional statement that you can use in place of using an if statement.
case语句是另一种条件型语句,您可以用该语句来替代if 语句。
So, each time this section of code is executed, the $TIME is checked to see if it matches the times of the case statement.
因此,每次执行这个代码段的时候,将检查 $TIME是否匹配case语句所指定的时间。
For each option, the case statement then attempts to identify the option, using either the short or long format and setting a variable.
对于每个选项,case语句会尝试识别该选项——使用短格式或长格式并设置一个变量。
The case statement works like its counterparts in traditional programming languages: It compares its argument to each pattern in a list; when a match is found, the corresponding code executes.
case语句的工作方式与传统编程语言中的对应结构相似。它将其参数与列表中的每个模式比较;当找到匹配项时,则执行对应的代码。
Ghisleni said McDonald's could appeal the case, and the Brazilian headquarters of the chain said in an e-mailed statement Thursday it was weighing its legal options.
吉斯·莱尼称麦当劳可对此提起上诉,麦当劳连锁店巴西总部于本周四在一份邮件声明中称,正在权衡是否要采用法律手段。
Jumping into a statement expression with goto or using a switch statement outside the statement expression with a case or default label inside the statement expression is not permitted.
不允许使用switch语句或是goto跳入到声明表达式中。
"For whatever reason, they were still hanging out on the Antarctic continent," Case said in a statement.
“无论是什么原因,它们确实一直在南极大陆上生活,”凯斯在一份声明中说。
In the first case, the constraint specification is consistent; in the second case, no statement about consistency can be made.
在第一种情况下,约束规范是一致的,在第二种情况下,不能对一致性给出结论。
After you have the cursor, you can tell it to give you the next record, in which case it moves down the list of records, in the order specified by the SQL statement.
创建了游标后,您可以通知它向您提供下一个记录,在种情况下,它会按sql语句指定的顺序向记录列表下方移动。
Unlike elapsed time, in case of a declare cursor statement the CPU time is the sum of open, all fetched and close.
与消耗时间不同,对于声明游标的语句,CPU时间是打开游标、所有读取操作和关闭游标的时间总和。
Each use case is represented by an oval, and labeled with a declarative statement that describes what action the use case is intended to perform.
每个用例都由一个椭圆形代表,用描述这个用例将要执行什么样的行为的说明型陈述进行标注。
According to the statement, the training will include lectures and case studies to improve civil servants' loyalty to the country and people, as well as their sense of responsibility and honesty.
公告中还指出,培训将通过讲座和案例学习来提高公务员对国家和人民的忠诚度,同时提高他们的责任感和诚信度。
In each XML file, you'll find a similar case-sensitive target statement that specifies where the content belongs in the navigation of a solution information project.
在每个XML文件中,都能发现一个类似的区分大小写的目标语句,这个语句指定了内容属于解决方案信息项目导航中的哪个位置。
Listing 5 shows the customary XML declaration, followed by a DOCTYPE statement that locates the DTD, in this case pointing at detail related to grammars.
清单5中首先展示常规的XML声明,然后是一个定位DTD的doctype语句,在本例中是指向与文法相关的详细信息。
In the case of the DB2 example in the left column of Table 3, if a particular SQL statement fails and generates an error, control is passed to the condition handler.
对于表3左侧列的DB 2示例,如果某条sql语句失败并生成一个错误,那么控制将被传递给条件处理程序。
I typically have the problem statement, any relevant use-case descriptions, the UML diagrams, and the code all in front of me at the same time as I work.
通常在我工作的同时,我会将问题陈述、所有相关用例描述、UML图和代码都放在我面前。
In that case, the SELECT statement verified that the tables were created and loaded properly.
在该示例中,select语句验证了表是否已正确创建和加载。
To get past the last IF statement we simply populate the password with the user name in case of SSO.
为了通过最后一个IF语句,只需对于sso用用户名填充密码。
"Her attending GP, through his quick response in activating the 993 ambulance for the patient, had also helped to minimise the spread of infection from this case, " said a ministry statement.
“病人的警惕,993救护服务在得知情况后的迅速出动,都使得传染的几率降至最低,”一个卫生部发言人说。
I'll qualify the statement in case I'm wrong by saying that probably by the time you read this the event will have happened.
我将发表声明以防我犯错,声明在您阅读本文时事件将可能发生。
In this case, clear the login data with the DROP REMOTE SERVER statement and recreate the login data.
在这种情况下,使用DROPREMOTEserver语句清除登录数据,然后重新创建登录数据。
For example, you can use it in combination with a case statement to choose the right aliases, as per the ps examples in the previous section, like Listing 10.
例如,可以按照前一部分中的ps示例,将该命令与case语句结合使用以选择正确的别名,如清单10所示。
That implies we'd have to change the final if statement considerably to allow for user name only, but only in the case of SSO.
这意味着必须修改最后一个IF 语句,允许只有用户名的情况,但是这个逻辑只适用于 SSO。
Stephanie Cox, Zhu’s court-appointed attorney, is not commenting on the case but eventually will release a statement, a secretary at her office said.
法庭为朱海洋指定的代理律师StephanieCox目前仍未对此案作出评论,但他办公室的秘书表示,他将会发表一则声明。
The prior section discussed the two submission elements and highlighted two statements in each submit definition that referenced the same tokens these case statement reference, teo and yah.
前面的部分讨论了两个submission元素并重点研究了每个submit定义中的两条语句,该语句引用了与case 语句引用的相同的标志,即teo 和 yah。
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语句可以用于模拟其他一些语言中的switchcase语句。
Consider the code above and realize that any enumerated value not specifically processed by a case statement is instead processed by the default statement.
研究以上代码可以看出,任何没有被case语句处理的枚举值都会被default语句处理。
Consider the code above and realize that any enumerated value not specifically processed by a case statement is instead processed by the default statement.
研究以上代码可以看出,任何没有被case语句处理的枚举值都会被default语句处理。
应用推荐