2016 Aug 08 8:40 AM
hello ,
my question is about narrow and wide casting.
when i read from text books of sap its appear to be in opposite definition according to in scn search (experts opinion )?
thank-you
regards
student.
2016 Aug 11 1:05 PM
To be honest, in some early stage of ABAP Objects we said in fact
"Narrowing Cast" for "Up Cast" and "Widening Cast" for "Down Cast".
Since Release 7.0, we do it as the rest of the world and say
"Narrowing Cast" for "Down Cast" and "Widening Cast" for "Up Cast".
This is even documented!
Terminology change for narrowing and widening casts
So you might have read old SAP textbooks
2016 Aug 08 11:27 AM
Hi Waqas,
When you loose attributes during assignment, it is narrow casting. And When you gain new attributes, it is widening.
Does text books say it differently ?
Thanks,
Anil
2016 Aug 08 12:44 PM
No, it's exactly the same definition for ABAP and for "all" other OO languages (I don't know all of course)
2016 Aug 11 11:27 AM
2016 Aug 11 1:05 PM
To be honest, in some early stage of ABAP Objects we said in fact
"Narrowing Cast" for "Up Cast" and "Widening Cast" for "Down Cast".
Since Release 7.0, we do it as the rest of the world and say
"Narrowing Cast" for "Down Cast" and "Widening Cast" for "Up Cast".
This is even documented!
Terminology change for narrowing and widening casts
So you might have read old SAP textbooks
2016 Aug 11 3:33 PM