Skip to Content
avatar image
Former Member

type-subcomponents without specific datatype specification

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 12, 2017 at 07:52 AM

    This is simply the old fashioned and obsolete way of writing

    ... comp1 TYPE c LENGTH 10

    The result is the same.

    Add comment
    10|10000 characters needed characters exceeded