- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I see in a lot of commercial applications when they provide a module
source containing interfaces for their C library what appear to me to
be incomplete definitions.
For example:
!C
__declspec(dllimport) unsigned short OutPortB(unsigned long Port, unsigned char Value);
When they include the attributes, they only include the following:
!DEC ATTRIBUTES C,ALIAS: "__OutPortB" :: OutPortB
I want to include:
!DEC ATTRIBUTES VALUE :: Port
!DEC ATTRIBUTES VALUE :: Value
Do I need those, or does the ATTRIBUTES C take care of that (as an assumed C default)? I prefer to be complete and clear in the definition.
Or am I completely confused?
For example:
!C
__declspec(dllimport) unsigned short OutPortB(unsigned long Port, unsigned char Value);
When they include the attributes, they only include the following:
!DEC ATTRIBUTES C,ALIAS: "__OutPortB" :: OutPortB
I want to include:
!DEC ATTRIBUTES VALUE :: Port
!DEC ATTRIBUTES VALUE :: Value
Do I need those, or does the ATTRIBUTES C take care of that (as an assumed C default)? I prefer to be complete and clear in the definition.
Or am I completely confused?
- Balises:
- Intel® Fortran Compiler
Lien copié
1 Répondre
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
ATTRIBUTES C implies pass-by-value - mostly. There is a table in the documentation that gives the details - some of them are not obvious. Building Applications > Programming with Mixed Languages > Adjusting Calling Conventions > ATTRIBUTES Properties and Calling Conventions. Study it carefully. Some of the attribute effects may seem nonsensical, but they were brought over from Microsoft Fortran PowerStation.
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable