Skip to Content
Former Member
Feb 04, 2009 at 07:18 AM

关于 narrowing cast 的疑问...



在 ABAP Keyword Documentation 中对 MOVE 的说明中有这样一段话:

Both these statements assign the content of the operand source to the data object destination. The variants with the addition TO or the assignment operator = are valid for all assignments between operands that are not reference variables, and for assignments between reference variables for which the static type of source is more specific than or the same as the static type of destination (narrowing cast).

但是在 ABAP Glossay 中对narrowing cast的说明是:Also called a narrowing cast, a down cast is an assignment between reference variables in which the typr static type of the target variable more specific than the static type of the source variable. A down cast is only possible in assignments with the casting operator (?=) or MOVE ... ?TO. Compare with up cast.

这两段对于narrowing cast的描述是相反的,哪个是正确的?谢谢!