From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,2ea6ccd50b440aa7,start X-Google-Attributes: gid103376,public From: vtis0102@CACANOps.uib.es (JIMHER@yanoesladirecci�n.com) Subject: Problem when overloading a procedure Date: 1999/08/14 Message-ID: #1/1 X-Deja-AN: 512801680 Organization: Telefonica Transmision de Datos Newsgroups: comp.lang.ada Date: 1999-08-14T00:00:00+00:00 List-Id: I'm writing a program, and I have found a problem when I try to overload a procedure. The program is: procedure program is type MyType is array(1..10) of character; procedure proc(s:in string) is begin put_line("Original string"); end proc; procedure proc(s:in MyType) is begin put_line("My type"); end proc; begin proc("hello"); end program; The problem is that, when I compile the program, the compiler says that is unable to select between the two forms of 'proc'. I suppose that it is because the compiler can't decide if the literal "hello" is of type string or MyType, so I tried ... begin proc(string("hello")); end program; but the compiler didn't accept it. I think that it will be some language way to tell the compiler if the literal sent to 'proc' is of type string or of type MyType, so I would thank a lot if any one could tell me how. Also, if it can be done by another way, it could help me too. Thanks in advance and sorry about my english -- Jes�s Jim�nez Herranz vtis0102@CACANOps.uib.es (Remove CACANO from the address)