- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve;
I can't pass variable length char strings to a subroutine.
For instance:
CALL SUB1("label")
Where in SUB1 it is typed character *(*). I don't know how else to type it,
since it doesn't know what the length will be
When I print the label within SUB1, it is gerbled or missing.
The interface blocks don't give out any warnings or errors.
Was this fixed later on? I've noticed LOTS of issues with the interface blocks, which come up when you change the argument list.
It's like the OLD interface stuff is still there to cause problems.You have to do a CLEAN afterward, even when everything is still compatible.
Thanks; Bill
PS How do I get build 74 of IVF 11.0?
I can't pass variable length char strings to a subroutine.
For instance:
CALL SUB1("label")
Where in SUB1 it is typed character *(*). I don't know how else to type it,
since it doesn't know what the length will be
When I print the label within SUB1, it is gerbled or missing.
The interface blocks don't give out any warnings or errors.
Was this fixed later on? I've noticed LOTS of issues with the interface blocks, which come up when you change the argument list.
It's like the OLD interface stuff is still there to cause problems.You have to do a CLEAN afterward, even when everything is still compatible.
Thanks; Bill
PS How do I get build 74 of IVF 11.0?
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve is still on vacation.
From your description, it seems like you want to use a legitimate f77 form. You probably shouldn't mix that with too much f90 syntax (such as interface blocks), as the form
character (len=*) :: string
is preferred.
It shouldn't be too difficult for you to show us an example of your problem.
At https://registrationcenter.intel.com
register your serial number, and create an account, if you haven't already,
then use your account to view your available downloads, and pick one.
From your description, it seems like you want to use a legitimate f77 form. You probably shouldn't mix that with too much f90 syntax (such as interface blocks), as the form
character (len=*) :: string
is preferred.
It shouldn't be too difficult for you to show us an example of your problem.
At https://registrationcenter.intel.com
register your serial number, and create an account, if you haven't already,
then use your account to view your available downloads, and pick one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
Steve is still on vacation.
From your description, it seems like you want to use a legitimate f77 form. You probably shouldn't mix that with too much f90 syntax (such as interface blocks), as the form
character (len=*) :: string
is preferred.
It shouldn't be too difficult for you to show us an example of your problem.
At https://registrationcenter.intel.com
register your serial number, and create an account, if you haven't already,
then use your account to view your available downloads, and pick one.
From your description, it seems like you want to use a legitimate f77 form. You probably shouldn't mix that with too much f90 syntax (such as interface blocks), as the form
character (len=*) :: string
is preferred.
It shouldn't be too difficult for you to show us an example of your problem.
At https://registrationcenter.intel.com
register your serial number, and create an account, if you haven't already,
then use your account to view your available downloads, and pick one.
*********************************************************
integer*4 seqno/13324533214/
integer*1 level/13/
integer*1 a(9,9)
call print_board("label",seqno,level,a)
subroutine print_board(label,seqno,level,in)
character (len=*) :: label
integer*1 in(9,9),level
integer*4 seqno
print 101,iboard,seqno,level
101 format(1x,a," seq:",i4," level=",i4)
print 102,((in(jj,kk),kk=1,9),jj=1,9)
102 format(9i2)
end subroutine
**********************************************************
The charcter printout is GARBLED.
Even with the same syntax you suggested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - billsincl
Here is an example:
*********************************************************
integer*4 seqno/13324533214/
integer*1 level/13/
integer*1 a(9,9)
call print_board("label",seqno,level,a)
subroutine print_board(label,seqno,level,in)
character (len=*) :: label
integer*1 in(9,9),level
integer*4 seqno
print 101,iboard,seqno,level
101 format(1x,a," seq:",i4," level=",i4)
print 102,((in(jj,kk),kk=1,9),jj=1,9)
102 format(9i2)
end subroutine
**********************************************************
The charcter printout is GARBLED.
Even with the same syntax you suggested.
*********************************************************
integer*4 seqno/13324533214/
integer*1 level/13/
integer*1 a(9,9)
call print_board("label",seqno,level,a)
subroutine print_board(label,seqno,level,in)
character (len=*) :: label
integer*1 in(9,9),level
integer*4 seqno
print 101,iboard,seqno,level
101 format(1x,a," seq:",i4," level=",i4)
print 102,((in(jj,kk),kk=1,9),jj=1,9)
102 format(9i2)
end subroutine
**********************************************************
The charcter printout is GARBLED.
Even with the same syntax you suggested.
print 101, label, seqno, level
iboard is not defined in this segment of code, and as you are not using IMPLICIT NONE, iboard defaults to INTEGER type, and has not been initialized, so will display random data.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - David White
*********************************************************
integer*4 seqno/133245332/
integer*1 level/13/
integer*1 a(9,9)
call print_board("label",seqno,level,a)
subroutine print_board(label,seqno,level,in)
implicit none
character (len=*) :: label
integer*1 in(9,9),level
integer*4 seqno
print 101,label,seqno,level
! the A descriptor is being used to print out the input arg.
101 format(1x,a," seq:",i4," level=",i4)
print 102,((in(jj,kk),kk=1,9),jj=1,9)
102 format(9i2)
end subroutine
**********************************************************
Still the same weird behavior as before.
Actually, without the IMPLICIT NONE, the default would be INTEGER*4 anyway.
It's clearly a BUG in the interface.
I wonder if build 74 fixed this problem - - - -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you don't present code which we can compile, we still have to guess what you have actually done, so I can't reproduce your complaint about the interface.
A bug in ifort which you have demonstrated is the lack of a diagnostic on your implicit jj and kk variables, but that doesn't appear to figure in your complaints.
If you want error checking of formats, there is 'ifort -check'. One evident problem is your overflow of the i4 format in print 101. That seems to show a bug in my copy of ifort runtime, as I don't get asterisks, instead the whole format disappears, with no diagnostic.
If you initialized your data, but don't care to show us how, that also makes your issue questionable to reproduce, although my copy of ifort appears to have initialized to zeros.
So, please, if you are trying to demonstrate a particular bug, don't mix in so many other bugs, both yours and possibly the compiler's.
A bug in ifort which you have demonstrated is the lack of a diagnostic on your implicit jj and kk variables, but that doesn't appear to figure in your complaints.
If you want error checking of formats, there is 'ifort -check'. One evident problem is your overflow of the i4 format in print 101. That seems to show a bug in my copy of ifort runtime, as I don't get asterisks, instead the whole format disappears, with no diagnostic.
If you initialized your data, but don't care to show us how, that also makes your issue questionable to reproduce, although my copy of ifort appears to have initialized to zeros.
So, please, if you are trying to demonstrate a particular bug, don't mix in so many other bugs, both yours and possibly the compiler's.

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