TypeCobol icon indicating copy to clipboard operation
TypeCobol copied to clipboard

Impossible to have a dictinct signature using a numeric on 2 bytes / 4 bytes

Open collarbe opened this issue 6 years ago • 2 comments

       declare procedure Dump public
           input argPtr     pointer
                 argLen  pic S9(9) COMP-5
           .
       declare procedure Dump public
           input argPtr     pointer
                 argLen  pic S9(4) COMP-5
           .

Syntax error : A function "Dump" with the same profile already exists in namespace "DVZXDBUG".

Picture Validator will be able to fix this issue. Bug found by @sarterbe

collarbe avatar Jul 27 '18 12:07 collarbe

We also need to discuss if we accept overload for different usage (comp-3 and comp-5)

  declare procedure Dump public
           input argPtr     pointer
                 argLen  pic S9(9) COMP-5
           .
       declare procedure Dump public
           input argPtr     pointer
                 argLen  pic S9(4) COMP-5
           .
       declare procedure Dump public
           input argPtr     pointer
                 argLen  pic S9(4) COMP-3
           .

Our hash calculation doesn't use usage

smedilol avatar Aug 07 '18 14:08 smedilol

After discussion with one of our user, he also need to do overload with different picture. He's ok if it means to recompile all its programs because it will change hash.

smedilol avatar Aug 09 '18 15:08 smedilol