Listing 1 below contains basic conditional code that could achieve this goal.
下面的清单1包含实现这一目标的基本条件代码。
When working with conditional code, you often know which branch is most likely and which is not.
在开发人员使用有条件代码时,常常知道最可能执行哪个分支,而哪个分支很少执行。
You will probably find yourself specifically targeting these two screen sizes, even to the extent of having conditional code paths and different XAML files for layout that is size-dependent.
你将会可能发现你自己专注于这两个尺寸的屏幕,甚至某种程度上,使用条件语句代码路径和不同的XAML文件根据具体的屏幕的大小来布局。
According to Iran's New Islamic Penal Code, prisoners can apply for conditional release after serving a third of their sentence.
根据伊朗的《新伊斯兰刑法典》,囚犯可以在服满三分之一刑期后申请有条件释放。
It slows down the next programmer in the code, as they have to think instead of just flowing through the conditional, if that makes sense.
这会减慢未来程序员使用这段代码,因为他必须去思考这段代码如何讲的通,而不是顺着条件去看。
Conditional and procedural elements in the pattern are expressed with code in special callouts.
有特别标注的代码能够表示模式中的条件性及程序性的单元。
Often, long methods and large classes are indications of other code smells, such as conditional complexity and duplicated code.
通常,长方法和大类也暗示着存在其他代码味道,如条件复杂度和重复代码。
And because every UNIX command returns a status code reflecting success or failure, you can use any command as a conditional — not just the test operators.
而且由于每个UNIX命令都返回一个指示成功或失败的状态代码,因此,您可以使用任何命令作为“条件”——而不仅仅是使用测试操作符。
A visual snippet diagram also supports the conditional execution of code groups, which you create by adding a conditional control structure.
可视代码片段关系图也支持代码组的条件执行,可以通过添加条件控制结构来创建。
In analysis, you might be content to leave the details out of your conditional expressions, whereas in design you might go so far as to include snippets of the code to be used in the end product.
在分析阶段,您可能愿意将详细信息排除在条件表达式以外,而在设计阶段,您却可能希望将最终产品中要使用的代码的片段包括在条件表达式中。
In addition, code assist is available when typing in the conditional expression.
除此之外,在输入条件表达式时,也可以使用代码帮助。
Conditional complexity can manifest in several different ways in source code.
条件复杂度可以以几种不同的方式出现在源代码中。
To display the logged in user's position we can use the following conditional expression in the Data Item expression referring to the Parameter Map "position Code" (Figure 20).
要显示登录用户的职位,可以在引用ParameterMap“PositionCode”的DataItemExpression中使用以下条件表达式(见图20)。
Add protocol-specific elements, transactions, a loop, a comment, conditional processing, and custom code.
添加特定协议元素、事务、循环、注释、条件处理和定制代码。
The following line of C code shows conditional branching
下面的C代码行表示了条件转移
XQuery's ability to transform XML output can be combined with its built-in support for conditional logic to reduce the complexity of application code.
XQuery的XML输出转换功能可以与它内置的对条件逻辑的支持相结合,以减少应用程序代码的复杂性。
This line of code might look a little odd because it is a conditional requires statement.
这行代码看起来有点古怪,因为它是一个条件语句。
Unicode character class specifiers, arbitrary code execution inside a pattern, flag toggles, conditional expressions, and many other features were added to the regular expression engine.
Unicode字符集、模式内任意代码操作、flagtoggles、条件表达式以及其他特征都被添加到正则表达式库中。
Then you use the conditional if statement to check the return code of the command.
然后,您使用条件型if语句,以检查该命令的返回代码。
Many similar tasks must be scripted separately because ant lacks support for loops, inheritance, and conditional processing; therefore, build code is duplicated and is sometimes redundant.
很多类似任务必须单独编写脚本,因为Ant缺乏对循环、继承和条件处理的支持;因而构建代码将出现重复,以致产生冗余代码。
This little piece of code shows the conditional if statement.
这一小段代码显示了条件型if语句。
You can code conditional WebSphere TX map logic within map rules using the PRESENT function, which tests to see if a particular data object is found in a data structure.
可以在映射规则中使用present函数编写有条件的WebSphereTX映射逻辑,这个函数检查在数据结构中是否可以找到某个数据对象。
For example, if the conditional is marked "likely" then the compiler can place the True portion of the code immediately following the branch (which will not be taken).
例如,如果一个条件标上了“likely”,那么编译器可以把代码的True部分直接放在分支指令后面(这样就不需要执行分支指令)。
I don't need to write custom tasks, for instance, because a Rake build script is Ruby (as opposed to XML); therefore, if I need some conditional logic, I can easily code it where I need it.
例如,我不必编写定制任务,因为Rake构建脚本是Ruby(而不是XML);因此,如果我需要某种条件逻辑,那么很容易在需要的地方编写这种逻辑。
You have a date field, a postal code, a field whose input is conditional upon the content of another, and so on.
您有一个日期区域,一个邮政编码,一个输入区域,以及等等。
Code excluded during conditional compilation is completely omitted from the final executable file, so it has no effect on size or performance.
条件编译时被排除的代码在最终的可执行文件中被完全忽略,所以不会对大小或性能有任何影响。
When writing a script for a Web page, always place conditional compilation code in comments.
当编写用于网页的脚本时,始终将条件编译代码放在注释中。
Conditional compilation constants have a special scope and cannot be accessed from standard code.
条件编译常数具有特殊的范围并且不能从标准代码访问。
As a conditional jump may cause significant code performance penalty, the architecture of recent VLIW DSPs offers support for conditional instructions.
为克服条件跳转指令的缺陷,新一代超长指令字(VLIW)体系结构的数字信号处理器(dsp)提供了对条件执行指令的支持。
This enables hosts that do not support conditional compilation to ignore this code.
这样,不支持条件编译的宿主就可以忽略该代码。
应用推荐