- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I would like to know if it possible to link in my main program libraries which must be called with different calling conventions.
For instance, I have subroutines I need to call from library A with these conventions: CVF / Upper Case / After Individual String Argument. Subroutines from library B must be called with the default IVF 10.1 settings.
Is it possible? If so, how can I do this, since the project properties (for External Procedures)apply to all external subroutines?
Thanks in advance,
Olivier
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
You do this by declaring an explicit interface for the routine you want to call and, if necessary, adding attributes to change the conventions. In your situation, I would suggest that the CVF-convention routines be declared with an ATTRIBUTES line like this:
!DEC$ ATTRIBUTES STDCALL, REFERENCE, MIXED_STR_LEN_ARG, DECORATE, ALIAS:"FUNCNAME" :: funcname
This would go inside an INTERFACE block declaring function funcname. In the ALIAS attribute, spell the name in uppercase. You would then need to make this interface visible to the caller - creating a module with the declarations and USEing the module is the easiest way.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks Steve! It does wonders.
Olivier
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora