DB 2 9.7现在支持隐式的数据类型强制转换。
这样做经常需要添加类型强制转换来编译代码。
Doing so often necessitates the addition of casts to get the code to compile.
还有一种选择是,检查不变量以确保类型强制转换将会成功。
Alternatively, examine the invariants to ensure that the casts will succeed.
这种方法可除去上面代码中类型强制转换的需要,但不修正错误。
This approach would eliminate the need to cast in the above code, but it would not fix the bug.
当数字从一种类型强制转换为另一种类型时,通常会发生转换。
Conversion typically occurs when the number is cast from one type to another type.
治疗和预防措施:把类型强制转换代码分解到每个类的单独方法中去。
Cures and preventions: Factor the casting code out into separate methods for each class.
另一个例子,在调用宿主对象的函数时,如何进行类型强制转换,这也是没有规定的。
Another example is that it's not explained how types are coerced when calling functions on host objects. For example, when you do.
在这种情况下,编译器尝试确定哪个重载函数要求最少数量的参数数据类型强制。
In this situation, the compiler attempts to determine which overloaded function requires the least number of data type coercions of the arguments.
把类型强制转换当作一种断言,把不变量当做说明该断言为true的原因的参数。
Think of a cast as a kind of assertion and the invariants as arguments for why the assertion is true.
此错误表示编译器找到了多个与具有相同数量的数据类型强制的参数相匹配的函数。
This error indicates that the compiler found more than one function that matches the arguments with the same number of data type coercions.
其次,它消除了易出错的类型强制转换的需要(这是一个在查询操作中比在CRUD中更常见的问题)。
Secondly, it removes the need for error-prone type casts. (a problem more common with query operations than CRUDs.)
改变了类型强制规则,以保持数组(更为常见)中的类型 ,而不是转换为Python 标量的类型。
The type coercion rules have changed to preserve types in arrays (more often), rather than converting to the type of a Python scalar.
一种解决方案是更改查询,将十进制类型强制转换为较小的数据类型,或者转换为字符串或二进制。
One solution would be to change the query to cast the decimal type to either a smaller datatype or convert to string or binary.
简言之,这些方法的本质总是使您确信代码块内部的不变量会确保代码块中的任何类型强制转换都将成功。
In short, the moral to this story is to always convince yourself that the invariants inside a code block ensure that any casts in the block will always succeed.
提供一些提示,以避免在某些具体方面(如语法、脚本解释顺序、自动类型强制等等)出现公用脚本错误。
Provides hints and tips to avoid common script mistakes in specific areas, such as syntax, order of script interpretation, automatic type coercion, and so on.
它包括构建在FluxAdvancedSecurityKernel (Flask)安全架构之上的强制访问控制,后者包括以插件模块形式提供的类型强制和多级安全(MLS)。
It includes mandatory access control built on top of the Flux Advanced security Kernel (Flask) security architecture, including type enforcement and multilevel security (MLS), all as plug-in modules.
有了类型推断,编译器可以通过强制解决计算出变量类型,而不是使程序员明确声明它们。
With type inference, the compiler figures out the types of variables based on constraint solving, rather than making the programmer declare them explicitly.
用于弱类型变量,以将它们强制转换为另一种类型。
注意,只有人工任务活动可以与跳转协同完成;所有其他活动类型需要强制结束。
Note, only human task activities can be completed in combination with a jump; all other activity types need to be force-completed.
这种控制类型称为强制访问控制(MAC)。
This type of control is called mandatory access control (MAC).
它进行静态类型检查,并且不允许强制类型转换,因而对于类型而言是安全的。
It is statically type-checked and does not allow type coercion, so is safe with regards to types.
这个约束强制任何类型'T '都必须具有无参数的公共构造函数。
This constraint forces any type 't' to have a default constructor, that is, a constructor that takes no parameters.
在一些州、郡县和直辖市推行各种类型不同程度的强制禁烟令。
A number of states, counties and municipalities have introduced various types of bans, and have enforced them with varying degrees of rigour.
Map和reduce并非必须强制某种特定类型的应用程序。
Map and reduce don't necessarily force a particular type of application.
在Desktop策略文档中,更改邮件类型设置、强制复制以及管理复制进度都不是默认选项。
Changing mail type Settings, enforcing replication, and managing the replication schedule are not part of the default options in the Desktop policy document.
清单2:Frontier:RPC中强制类型转换。
这个方法强制这个标记类型假设每个工作条目需要每个服务及策略。
This approach forces this style of tagging to presume that every work item required every service and policy.
比范围更加微妙的是指针和整型之间的转换;由于这些转换通常都包括强制类型转换,因此编译器很难告诉您到底做错了什么。
More subtle than ranges are conversions between pointers and integers; because these conversions generally involve casts, it's hard for the compiler to tell you what you're doing wrong.
因此在决定如何对该方法的返回值进行强制类型转换时,必须同时考虑预期的返回类型和所用的数据模型。
One must therefore take into account both the expected return type and the data model when deciding how to cast the object that this method returns.
因此在决定如何对该方法的返回值进行强制类型转换时,必须同时考虑预期的返回类型和所用的数据模型。
One must therefore take into account both the expected return type and the data model when deciding how to cast the object that this method returns.
应用推荐