switch statement

[swɪtʃ ˈstetmənt][switʃ ˈsteitmənt]

[计] 交换语句

  • I get the int and store it in n.The switch statement takes inside its parenthesis an int or a char or some primitive type .

    我得到一个整数并把它存储,到n中, switch 语句的圆括号里可以是一个整数,或者一个字符或其他的基本类型。

  • First you parse the ID from the XML structure returned from PHP then you use a switch statement to direct the error to the appropriate message or associated code .

    首先,从XML结构(从PHP返回的)中解析ID,然后使用一个 转换 语句直接指向消息或者相关代码。

  • Search the Web for general subjects such as javascript dom javascript tutorial javascript reference or more specific subjects such as javascript switch statement .

    在Web上搜索普通主题如javascriptdom、javascript教程、javascript参考或更多详细主题如javascript switch 语句即可获取相关资料。

  • A little trick of using a dictionary as a switch statement is used here ( although the otherwise case remains too narrow in the example ) .

    在这里我们使用了一个技巧,就是用一个字典作为一个 switch 语句(尽管示例中的otherwise情况还是太狭窄了)。

  • Here the enumerated value is passed into the switch statement ( remember getGrade () returns an instance of Grade ) and each case clause deals with a specific value .

    在这里,枚举值被传递到 switch 语句中(请记住,getGrade()是作为Grade的实例返回的),而每个case子句将处理一个特定的值。

  • Then it uses the all-too-familiar switch statement to determine the error level and craft an error message appropriate to that level .

    然后,它使用再熟悉不过的 开关 语句来决定错误等级并相应打造与该等级相适应的错误消息。

  • The OMG CORBA specification describes the IDL union as a cross between a C union and a switch statement .

    OMGCORBA规范将IDL联合描述成C联合类型和 switch 语句的混合物。

  • This operation will first switch to the top frame of the call stack and then set the next statement to a different function . Are you sure ?

    该操作将首先 切换到调用堆栈的顶桢,然后将下一 语句设置为其他函数。确实要这样做吗?

  • Switch to the stored procedure editor ASSOC_PROC and pass the code between the cursor declaration and the cursor OPEN statement .

    切换到存储过程编辑器ASSOCPROC并传递进指针声明和指针“OPEN” 语句之间的那些代码。

  • Ceylon also ensures ( at compile time ) that the switch statement contains an exhaustive list of instance tests or at a minimum an else clause to provide complete coverage .

    Ceylon还确认(在编译时) switch 语句包含详尽的实例测试列表,至少包含else子句,从而提供完整的覆盖范围。

  • Polymorphism is a feature that cannot be viewed in isolation ( like a switch statement can for example ) but instead works only in concert as part of a big picture of class relationships .

    多态性是一种不能 孤立 对待的特性,而只有放在类的继承关系图下才有意义。

  • It is similar to a switch statement in the Java language and many other languages .

    它类似于Java语言和很多其他语言中的 switch 语句

  • We resorted to using a simple switch statement in order to define the class value with more control .

    我们使用一个简单的 switch 语句,以更强的控制能力定义class值。

  • One of the primary reasons for this is primitives and instructions are wrapped in a huge switch statement in C which is a pain to maintain by hand .

    这样做的主要原因是基础实现和指令在C语言的 声明中可以包装为一个大的 switch 表达式,如果使用手工的方式来完成无疑将会是非常痛苦的。

  • One of the language features introduced in Java SE7 is to allow the switch statement to operate on variables of type String as well as on primitive types and enums .

    JavaSE7中引入的一个语言功能是允许 switch语言在类型为String的变量上操作,同样也允许其在原始类型和枚举变量上操作。

  • Augmenting the switch statement to include Strings .

    switch 语句包含了对字符串的支持。

  • This is the conventional way to build a switch statement but the break is optional .

    这是构建 switch 语句的一种传统方式,但break是可选的。

  • A switch / case statement is used to delegate to appropriate functions .

    switch/case 语句用于指派正确的函数。

  • Although it appears you 're switching on a character here the switch statement is actually using the integral value of the character .

    尽管我们在这儿表面上要处理的是字符,但 switch 语句实际使用的字符的整数值。

  • The good news is that we don 't have to change our code if we switch databases except for the places such as the use statement and the new statement where we mention Persistent : : MySQL by name .

    令人欣慰的是,除了通过名称来引用Persistent::MySQL之外(例如use 语句和new语句),在 切换数据库时不需要更改代码。

  • This is part of a large switch statement that enumerates each method ; this will become important later .

    这是一个列举每种方法的庞大 switch 语句中的一部分,这些内容待会就变得很重要。

  • 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 语句

  • The first thing to notice is the switch statement which works in conjunction with the enclosed case statements .

    首先应注意 switch 语句,它与附带的case语句结合使用。

  • Within the switch statement of the tcp_usrreq () function the case for PRU_LISTEN checks if the socket is bound to the port .

    在tcpusrreq()函数的 切换 语句中,PRULISTEN的实例检查套接字是否绑定到端口。

  • Without it or the equivalent-C switch Perl prints a warning about wide data in the print statement ( see perldoc perlunicode and perldoc perlrun for details ) .

    如果没有这个调用,或者等效的-C 开关,Perl就会打印一个打印 语句中有宽数据的警告信息(详细信息请参阅perldocperlunicode和perldocperlrun)。

  • The switch statement selects from among pieces of code based on the value of an integral expression .

    根据一个整数表达式的值, switch 语句可从一系列代码选出一段执行。

  • Not all enum constants covered on switch Missing enumerations on a switch statement meaning that you may miss some enumerated options .

    Notallenumconstantscoveredonswitch switch 语句缺少枚举项意味着您可能遗漏一些枚举选项。