Error passing text-string in a subroutine call

Error passing text-string in a subroutine call

Hi,

When compiling the code below I get the message:

Error 1  Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element.   [TEXT] C:\CALC\veivaks\Veivaks2_IVF\Veivaks2_IVF\Example_Source1.F90 14 
Error 2  Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element.   [TEXT] C:\CALC\veivaks\Veivaks2_IVF\Veivaks2_IVF\Example_Source1.F90 17 

This sibroutine and call has been used for VAX/VMS, MS Powerstation and with CVF without problems, but with IVF it do not work. What's wrong:

The example code is attached

Regards

 

 

Fichier attachéTaille
Télécharger example-source1.f901.03 Ko
2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hello

Old compilers doesn't detect such usage : treating as character*1 array a character*n argument.

Replace

CHARACTER*1 TEXT(50),IEND,TEX(50)

by

CHARACTER*(*) TEXT

CHARACTER*1 IEND,TEX(LEN(TEXT))

and

TEXT(I)

by

TEXT(I:I)

I think it will works

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui