- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
character*(*) parameters in fortran require 2 parameters in Delphi, one of them being the string length (hidden argument in fortran).
Unfortunately these length parameters are after all other parameters.
What should I do to keep the character string argument and the length argument together ?
Example : fortran : parameters c1, c2, i1, i2 (c=char, i=integer)
Seen by Delphi :
c1, c2, i1, i2, l1, l2 (l1 and l2 being the length of c1 and c2 respectively).
Desirable is :
c1, l1, c2, l2, i1, i2
According to the release notes, this parameter order would be possible, but I am unable to find out how this can be obtained.
Thanks for any help offered !
Jan (Belgium)
Unfortunately these length parameters are after all other parameters.
What should I do to keep the character string argument and the length argument together ?
Example : fortran : parameters c1, c2, i1, i2 (c=char, i=integer)
Seen by Delphi :
c1, c2, i1, i2, l1, l2 (l1 and l2 being the length of c1 and c2 respectively).
Desirable is :
c1, l1, c2, l2, i1, i2
According to the release notes, this parameter order would be possible, but I am unable to find out how this can be obtained.
Thanks for any help offered !
Jan (Belgium)
Enlace copiado
1 Responder
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You can force fortran compiler not to expect length at all using REFERENCE attribute on string dummy. See here for an illustration. You have to provide length explicitly, though, but you could do it either by hard-coding or by passing an additional real (i.e. not hidden) integer argument. In this way, you'd have full control over how and where length arguments are passed.
There's also compiler switch /iface: which can be set up on Project/Settings/Fortran/External Procedures/String Length Arg Passing (maybe it's moved somewhere nearby in newer CVF versions).
HTH
Jugoslav
There's also compiler switch /iface: which can be set up on Project/Settings/Fortran/External Procedures/String Length Arg Passing (maybe it's moved somewhere nearby in newer CVF versions).
HTH
Jugoslav

Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla