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

Difference between local types and internal types

alejiandro_sensejl
Active Participant
0 Likes
570

Hello everyone,

in the class builder (se24) I have the choice to create local types (button in the toolbar) and internal types (tab). The only difference I know is that local types are always private while internal types can go from private to public.

Is there a rule when I should favor internal types over local types (apart from the visibility) and vice versa?

Regards,

Alej

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
510

Hi,

use local types (button in the toolbar) ->if you want to create local classes and interfaces

and internal types (tab) -> if you want to create local data types .

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
510

local types are always private

These types are private within the class pool, which means are private to global class itself + any local classes you define within the class pool. Outside are indeed inaccessible.

internal types can go from private to public

These types are private to global class but unless are set explicitly as public there are invisible to all local classes defined in class pool. The visibility of these data types can be individualy set.

Is there a rule when I should favor internal types over local types (apart from the visibility) and vice versa?

I think the only advantage from having "internal types" over local types is that it can be accessed by subclass or friend class depending on the type of visibility you have choosen, but are invisible to all local classes (except for being declared as public). In contrary all local types can stay only local, nothing more.

Regards

Marcin

Read only

Former Member
0 Likes
511

Hi,

use local types (button in the toolbar) ->if you want to create local classes and interfaces

and internal types (tab) -> if you want to create local data types .