Quantcast
Channel: SCN : Popular Discussions - ABAP和Java开发 (ABAP & Java Development)
Viewing all articles
Browse latest Browse all 4604

关于 narrowing cast 的疑问...

$
0
0

请教大家一个问题。

在 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的描述是相反的,哪个是正确的?谢谢!


Viewing all articles
Browse latest Browse all 4604

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>