- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
In a fortran subroutine, I am trying to use the text function getcharwidth32.
The compiler gives warning
Variable ABC is used before its value has been defined
The call to the command is
ret=getcharwidth32(hdc,1,ntv,ABC)
and I get a last error via getlasterror of 87
which is The parameter is incorrect
At the top of the subroutine i have
use dfwinty
use gdi32
use gdi32
and define ABC to be
integer ABC(0:255)
Any suggestions
Link kopiert
2 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hint: when in doubt, do a "Find in Files" for requested symbol in
C:PROGRAM FILESINTELCOMPILERFORTRAN9.0IA32INCLUDE
and take a look at Fortran INTERFACE.
For GetCharWidth32, the last argument is
integer(LPINT) arg4 ! LPINT arg4
and it doesn't have a !DEC$ATTRIBUTES REFERENCE. That means that you need:
ret=GetCharWidth32(hdc,1,ntv,LOC(ABC))
(LPINTs, LPDWORDs etc. are always translated by Intel's translator software into integer(LPDWORD), instead of, perhaps more natural, integer(DWORD)+!DEC$ATTRIBUTES REFERENCE. That means that you always have to use LOC() in the calling sequence).
C:PROGRAM FILESINTELCOMPILERFORTRAN9.0IA32INCLUDE
and take a look at Fortran INTERFACE.
For GetCharWidth32, the last argument is
integer(LPINT) arg4 ! LPINT arg4
and it doesn't have a !DEC$ATTRIBUTES REFERENCE. That means that you need:
ret=GetCharWidth32(hdc,1,ntv,LOC(ABC))
(LPINTs, LPDWORDs etc. are always translated by Intel's translator software into integer(LPDWORD), instead of, perhaps more natural, integer(DWORD)+!DEC$ATTRIBUTES REFERENCE. That means that you always have to use LOC() in the calling sequence).
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
This works thanks again
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite