- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Program test
integer m,nl(3)
Character*256 fname,modnam,arg2
arg2=' something'
modnam = 'all'
fname = 'test.me'
m = 1
nl(1)=2
call fluidic(m,arg2,fname,nl,modnam)
stop
end
SUBROUTINE FLUIDIC(MREC,NF,F1,N1,MODNAMIN,
x F2,N2,MODNAMIN2)
C
OPTIONAL F2
OPTIONAL N2
OPTIONAL MODNAMIN2
Character*32 F1(1),MODNAM,F2(1),MODNAM2
Character*(*) NF,MODNAMIN,MODNAMIN2
INTEGER N1(1),N2(1),MREC
LOGICAL DOPATHS
C
C
MODNAM = MODNAMIN(1:min(32,(3)))
DOPATHS = PRESENT(MODNAMIN2)
write(*,*)' the logical ',dopaths
IF( PRESENT(MODNAMIN2) ) THEN
MODNAM2 = MODNAMIN2(1:min(32,(3)))
DOPATHS = .TRUE.
ELSE
DOPATHS = .FALSE.
ENDIF
return
end
Thanks,
Dave
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(after modifying it a bit for free format f90)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting false as well. I tried it with both 11.1.064 and 12.1 update 8.
What compiler flags are you using?
Annalee
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
c:\V55IVF64\sinda33\models>ifort test.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414 Package ID: w_cprof_p_11.1.065
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Microsoft Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
-out:test.exe
-subsystem:console
test.obj
c:\V55IVF64\sinda33\models>test
the logical T
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
test.exe 000000014003D7A3 Unknown Unknown Unknown
test.exe 0000000140001D4B Unknown Unknown Unknown
test.exe 0000000140001154 Unknown Unknown Unknown
test.exe 000000014005670C Unknown Unknown Unknown
test.exe 000000014003CDAB Unknown Unknown Unknown
kernel32.dll 000000007725F33D Unknown Unknown Unknown
ntdll.dll 0000000077392CC1 Unknown Unknown Unknown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!COMPILER-GENERATED INTERFACE MODULE: Tue Jan 03 13:41:12 2012
MODULE FLUIDIC__genmod
INTERFACE
SUBROUTINE FLUIDIC(MREC,NF,F1,N1,MODNAMIN,F2,N2,MODNAMIN2)
INTEGER(KIND=4) :: MREC
CHARACTER(*) :: NF
CHARACTER(LEN=32) :: F1(1)
INTEGER(KIND=4) :: N1(1)
CHARACTER(*) :: MODNAMIN
CHARACTER(LEN=32) ,OPTIONAL :: F2(1)
INTEGER(KIND=4) ,OPTIONAL :: N2(1)
CHARACTER(*) ,OPTIONAL :: MODNAMIN2
END SUBROUTINE FLUIDIC
END INTERFACE
END MODULE FLUIDIC__genmod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"My general advice is that if you feel you have to write an INTERFACE block for Fortran code, you're doing it wrong, though I can appreciate that there are circumstances, such as updating old code, where this might be reasonable."
I do like the ability to have a generic routine that in actuality spawns to other specific routines based on argument type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page