Casting operator

From Abap2Java

Revision as of 21:08, 3 April 2008; Spotman (Talk | contribs)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
Jump to: navigation, search

Image:Dotright.JPG ABAP

To convert a variable with a certain data type into another data type, a cast is necessary. A cast can be done implicitly using a simple assignment (widening cast), or using the casting operator ?=.

lr_car     = lr_porsche.
lr_porsche ?= lr_car.

Image:Dotleft.JPG Java

Translation:
(...)

lr_car     = lr_porsche;
lr_porsche = (cl_porsche) lr_car;
Personal tools