- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
there are two functions named "moveto" and "settextposition", I call them in the main program. However, one is called without error, the "settextposition" is called with error:error FOR3120: no specific match for reference to generic SETTEXTPOSITION.
thedefinitionof function "moveto" is as follows:
$if _MSFORTRAN_ .lt. 300
INTERFACE
SUBROUTINE moveto[ALIAS:"__f_moveto@12"](x,y,s)
INTEGER*2 x,y
STRUCTURE/xycoord/
INTEGER*2 xcoord
INTEGER*2 ycoord
END STRUCTURE
RECORD/xycoord/s[REFERENCE]
END SUBROUTINE
END INTERFACE
$else
INTERFACE MOVETO
SUBROUTINE $$MSFLIB$MOVETO$22[alias:'__f_moveto@12'](x,y,s)
INTEGER*2 x
INTEGER*2 y
STRUCTURE/xycoord/
INTEGER*2 xcoord
INTEGER*2 ycoord
END STRUCTURE
RECORD/xycoord/s[REFERENCE]
END SUBROUTINE
SUBROUTINE $$MSFLIB$MOVETO$24[alias:'__f_moveto@12'](x,y,s)
INTEGER*2 x
INTEGER*4 y
STRUCTURE/xycoord/
INTEGER*2 xcoord
INTEGER*2 ycoord
END STRUCTURE
RECORD/xycoord/s[REFERENCE]
END SUBROUTINE
SUBROUTINE $$MSFLIB$MOVETO$42[alias:'__f_moveto@12'](x,y,s)
INTEGER*4 x
INTEGER*2 y
STRUCTURE/xycoord/
INTEGER*2 xcoord
INTEGER*2 ycoord
END STRUCTURE
RECORD/xycoord/s[REFERENCE]
END SUBROUTINE
SUBROUTINE $$MSFLIB$MOVETO$44[alias:'__f_moveto@12'](x,y,s)
INTEGER*4 x
INTEGER*4 y
STRUCTURE/xycoord/
INTEGER*2 xcoord
INTEGER*2 ycoord
END STRUCTURE
RECORD/xycoord/s[REFERENCE]
END SUBROUTINE
END INTERFACE
$endif
the definition of function" settextposition" is as follows:
$if _MSFORTRAN_ .lt. 300
INTERFACE
SUBROUTINE settextposition &
& [ALIAS:"__fq_settextposition@12"](row,col,s)
INTEGER*2 row
INTEGER*2 col
STRUCTURE/rccoord/
INTEGER*2 rcoord
INTEGER*2 ccoord
END STRUCTURE
RECORD/rccoord/s[REFERENCE]
END SUBROUTINE
END INTERFACE
$else
INTERFACE SETTEXTPOSITION
SUBROUTINE $$MSFLIB$SETTEXTPOSITION$22 &
& [alias:'__fq_settextposition@12'](row,col,s)
INTEGER*2 row
INTEGER*2 col
STRUCTURE/rccoord/
INTEGER*2 rcoord
INTEGER*2 ccoord
END STRUCTURE
RECORD/rccoord/s[REFERENCE]
END SUBROUTINE
SUBROUTINE $$MSFLIB$SETTEXTPOSITION$24 &
& [alias:'__fq_settextposition@12'](row,col,s)
INTEGER*2 row
INTEGER*4 col
STRUCTURE/rccoord/
INTEGER*2 rcoord
INTEGER*2 ccoord
END STRUCTURE
RECORD/rccoord/s[REFERENCE]
END SUBROUTINE
SUBROUTINE $$MSFLIB$SETTEXTPOSITION$42 &
& [alias:'__fq_settextposition@12'](row,col,s)
INTEGER*4 row
INTEGER*2 col
STRUCTURE/rccoord/
INTEGER*2 rcoord
INTEGER*2 ccoord
END STRUCTURE
RECORD/rccoord/s[REFERENCE]
END SUBROUTINE
SUBROUTINE $$MSFLIB$SETTEXTPOSITION$44 &
& [alias:'__fq_settextposition@12'](row,col,s)
INTEGER*4 row
INTEGER*4 col
STRUCTURE/rccoord/
INTEGER*2 rcoord
INTEGER*2 ccoord
END STRUCTURE
RECORD/rccoord/s[REFERENCE]
END SUBROUTINE
END INTERFACE
$endif
In the main program, I call them as follows:
RECORD /xycoord/xy
CALL moveto( 100, 250, xy )
CALL settextposition ( 2, 36, xy)
I want to know why I can call moveto while cannot call settextposition?
thanks.
1 解決策
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You are using a non-standard extension to Fortran-77. Which compiler did you use, and with what options?
The third argument to MOVETO is of type 'xycoord', whereas the third argument to SETTEXTPOSITION is of type 'rccoord'. Even though both these STRUCTURE variables consist of two INTEGER*2 variables, they may not be considered compatible.
A similar situation exists with respect to derived types in Fortran 9x and Fortran 200x.
If there is no need to have STRUCTURE rccoord, replace 'rccoord' by 'xycoord' to allow the source to be compiled without errors.
That said, you really need to use variable types that match whatever types are specified for the library routines that you will link to. Therefore, you need to match the interface bodies to those specified for SETTEXTPOSITION and MOVETO, and the best way for doing that is to use modules. If you follow this recommendation, with CVF 6.x, the only lines of code that you need are
The third argument to MOVETO is of type 'xycoord', whereas the third argument to SETTEXTPOSITION is of type 'rccoord'. Even though both these STRUCTURE variables consist of two INTEGER*2 variables, they may not be considered compatible.
A similar situation exists with respect to derived types in Fortran 9x and Fortran 200x.
If there is no need to have STRUCTURE rccoord, replace 'rccoord' by 'xycoord' to allow the source to be compiled without errors.
That said, you really need to use variable types that match whatever types are specified for the library routines that you will link to. Therefore, you need to match the interface bodies to those specified for SETTEXTPOSITION and MOVETO, and the best way for doing that is to use modules. If you follow this recommendation, with CVF 6.x, the only lines of code that you need are
[fortran] PROGRAM MAIN
USE MSFLIB
RECORD /XYCOORD/xy
RECORD /RCCOORD/rc
...
... assign values to xy, rc, as needed
...
CALL moveto( 100, 250, xy )
CALL settextposition ( 2, 36, rc)
end
[/fortran]
コピーされたリンク
7 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The interface to settextposition might have changed.
The procedures MOVETO and SETTEXTPOSITION are part of QuickWin, so it's better if you use the corresponding module (IFQWIN ) instead of trying to guess how the interface block looks like. Alternatively, take a look at the ifqwin.f90 file (in "%ifort_compiler11%\include" or something similar).
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You are using a non-standard extension to Fortran-77. Which compiler did you use, and with what options?
The third argument to MOVETO is of type 'xycoord', whereas the third argument to SETTEXTPOSITION is of type 'rccoord'. Even though both these STRUCTURE variables consist of two INTEGER*2 variables, they may not be considered compatible.
A similar situation exists with respect to derived types in Fortran 9x and Fortran 200x.
If there is no need to have STRUCTURE rccoord, replace 'rccoord' by 'xycoord' to allow the source to be compiled without errors.
That said, you really need to use variable types that match whatever types are specified for the library routines that you will link to. Therefore, you need to match the interface bodies to those specified for SETTEXTPOSITION and MOVETO, and the best way for doing that is to use modules. If you follow this recommendation, with CVF 6.x, the only lines of code that you need are
The third argument to MOVETO is of type 'xycoord', whereas the third argument to SETTEXTPOSITION is of type 'rccoord'. Even though both these STRUCTURE variables consist of two INTEGER*2 variables, they may not be considered compatible.
A similar situation exists with respect to derived types in Fortran 9x and Fortran 200x.
If there is no need to have STRUCTURE rccoord, replace 'rccoord' by 'xycoord' to allow the source to be compiled without errors.
That said, you really need to use variable types that match whatever types are specified for the library routines that you will link to. Therefore, you need to match the interface bodies to those specified for SETTEXTPOSITION and MOVETO, and the best way for doing that is to use modules. If you follow this recommendation, with CVF 6.x, the only lines of code that you need are
[fortran] PROGRAM MAIN
USE MSFLIB
RECORD /XYCOORD/xy
RECORD /RCCOORD/rc
...
... assign values to xy, rc, as needed
...
CALL moveto( 100, 250, xy )
CALL settextposition ( 2, 36, rc)
end
[/fortran]
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Quoting mecej4
The third argument to MOVETO is of type 'xycoord', whereas the third argument to SETTEXTPOSITION is of type 'rccoord'. Even though both these STRUCTURE variables consist of two INTEGER*2 variables, they are not considered equivalent.
A similar situation exists with respect to derived types in Fortran 9x and Fortran 200x.
If there is no need to have STRUCTURE rccoord, replace 'rccoord' by 'xycoord' to allow the source to be compiled without errors.
A similar situation exists with respect to derived types in Fortran 9x and Fortran 200x.
If there is no need to have STRUCTURE rccoord, replace 'rccoord' by 'xycoord' to allow the source to be compiled without errors.
How about the difference:
SUBROUTINE settextposition &
& [ALIAS:"__fq_settextposition@12"](row,col,s)
with
SUBROUTINE moveto[ALIAS:"__f_moveto@12"](x,y,s)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I am using Windows Powerstation 4 compiler. I chose this program to be a quickwin project.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Quoting John
The interface to settextposition might have changed.
The procedures MOVETO and SETTEXTPOSITION are part of QuickWin, so it's better if you use the corresponding module (IFQWIN ) instead of trying to guess how the interface block looks like. Alternatively, take a look at the ifqwin.f90 file (in "%ifort_compiler11%\include" or something similar).
I did include four modules:
INCLUDE 'FGRAPH.FI'
INCLUDE 'ATLDEFS.FOR'
INCLUDE 'ATLERRS.FOR'
..............
INCLUDE' FGRAPH.FD'I am new of Fortran, would you please explain for me for situation using not Intel Fortran?
Thanks.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I do not have Powerstation installed any more. I suspect that the code that I gave in #2 might work with it.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Quoting mecej4
I do not have Powerstation installed any more. I suspect that the code that I gave in #2 might work with it.
Call moveto (10,20,xy), I thought xy is assign as 10,20 already , SO I donot need to assign it before?
Thank you for your explanation, I will try that.
Thanks again.