Skip to Content
0

type-subcomponents without specific datatype specification

Apr 12, 2017 at 07:19 AM

23

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Keller
Apr 12, 2017 at 07:52 AM
1

This is simply the old fashioned and obsolete way of writing

... comp1 TYPE c LENGTH 10

The result is the same.

Share
10 |10000 characters needed characters left characters exceeded