- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi There
I am porting a CVF project to IVF but run into some problem
I have inserted USE IFPORT in my source code
and below in the code I have
USE DFLIB
CHARACTER($MAXPATH)BUFX
CHARACTER($MAXPATH)BUFX
but the file does not compile I got the following message
D:Simpow_viewslars_10.2bugfix_viewsimpowsrc simpowm_wnty34072.f(25) : Error: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [$MAXPATH]
compilation aborted for D:Simpow_viewslars_10.2bugfix_viewsimpowsrc simpowm_wnty34072.f (code 1)
Any ideas ?
/Lars
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Sorry, It should of course be
USE IFPORT
CHARACTER($MAXPATH)BUFX
CHARACTER($MAXPATH)BUFX
/Lars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
There was a typing msstakein my previous message .....
I have used the following code.
I have inserted USE IFPORT in my source code
and below in the code I have
USE IFPORT
CHARACTER($MAXPATH)BUFX
CHARACTER($MAXPATH)BUFX
but the file does not compile I got the following message
D:Simpow_viewslars_10.2bugfix_viewsimpowsrc simpowm_wnty34072.f(25) : Error: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [$MAXPATH]
compilation aborted for D:Simpow_viewslars_10.2bugfix_viewsimpowsrc simpowm_wnty34072.f (code 1)
Any ideas ?
/Lars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works for me. Perhaps what you typed into the message is not the actual code. What happens when you compile the following program?
use ifport
character($MAXPATH) x
end
Also, what version of the compiler do you have? (8.0.???)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
I have tested a very simple code as below:
SUBROUTINE A1
USE IFPORT
CHARACTER BUF($MAXPATH)
END
USE IFPORT
CHARACTER BUF($MAXPATH)
END
And got the error below
Compiling...
ifort /nologo /Zi /Od /fpp /include:"....simpowsrcvers" /iface:cvf /iface:mixed_str_len_arg /module:"Debug/" /object:"Debug/" /traceback /libs:static /threads /dbglibs /winapp /c /extfor:f d:Simpow_viewslars_10.2bugfix_viewsimpowsimpow_wntsimpowSOURCE1.f
d:Simpow_viewslars_10.2bugfix_viewsimpowsimpow_wntsimpowSOURCE1.f(3) : Error: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [$MAXPATH]
CHARACTER BUF($MAXPATH)
--------------------^
compilation aborted for d:Simpow_viewslars_10.2bugfix_viewsimpowsimpow_wntsimpowSOURCE1.f
It seems to me that the "USE IFPORT" is NOT included in the code
Ihave the following fortran compiler
C:WINDOWSsystem32>ifort
Intel Fortran Compiler for 32-bit applications, Version 8.0 Build 20031017Z
Package ID: w_fc_p_8.0.035
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
Intel Fortran Compiler for 32-bit applications, Version 8.0 Build 20031017Z
Package ID: w_fc_p_8.0.035
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
Best Regards
/Lars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok - you're using a very old compiler. Please update, if you can, to the current version (whch is 8.0.048). Your second example also works for me.
Do you realize that your second example declares an array of CHARACTER*1 elements?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
I have now installed the latest version of the compiler xxxx 047+ patch 048
And now I can compile without any problem
Thanks
/Lars
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page