Activity Chart Checks : (C3107) Subroutines with illegal parameter type or return type

(C3107) Subroutines with illegal parameter type or return type

Error In:
Correctness
Description:
A subroutine uses an illegal parameter type or return type. The following table lists the illegal definitions for UDTs.
 
(*) In these cases, an interim UDT is needed. For example, if the return type of a function should be an array of string, it should be defined as UDT array of STR_UDT, and STR_UDT, a string.
Format:
subroutine <subroutine name>
return type <user-def type>, defined as <type> <user-def type>, type of parameter <parameter>, defined as <type>
 
Example:
A subroutine, defined as a function, has a return type T_ARR_STR. T_ARR_STR is defined as an array of strings from 1 to 5. The error is generated because T_ARR_STR is defined directly. To correct this error, an intermediate UDT is required:

T_ARR_STR is defined as an array from 12 to 5 of UDT T_STR

T_STR is defined as a string

 

Erroneous Elements:
Subroutines