Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

type-subcomponents without specific datatype specification

Former Member
0 Likes
574

Hello,

I am currently working myself into some legacy code and found a types definition where some of the subcomponents do not have a specific datatype declaration. The code looks something like this:

types: begin of my_new_type,
       a_date type d,
       comp_1(10),
       comp_2(2),
      end of my_new_type.

The confusing parts for me are comp_1 and comp_2. I would guess they are defined as type C implicitly. However, I wonder how such a definition is valid in a strongly typed programming language.

Regards

Sebastian

1 ACCEPTED SOLUTION
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
521

This is simply the old fashioned and obsolete way of writing

... comp1 TYPE c LENGTH 10

The result is the same.

1 REPLY 1
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
522

This is simply the old fashioned and obsolete way of writing

... comp1 TYPE c LENGTH 10

The result is the same.