- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In an earlier post regarding to Fortran Module Wizard there are some warnings produced by the IFX & IFORT compilers. The example below is typical of a case where compiler issues a warning:
Modules\MSPPT.f90(8333): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [NEWSECTIONINDEX]
SUBROUTINE $Presentation_NewSectionAfter($OBJECT, Index, AfterSlide, sectionTitle, newSectionIndex, $STATUS)
!DEC$ ATTRIBUTES DLLEXPORT :: $Presentation_NewSectionAfter
IMPLICIT NONE
INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer
!DEC$ ATTRIBUTES VALUE :: $OBJECT
INTEGER, INTENT(IN) :: Index
!DEC$ ATTRIBUTES REFERENCE :: Index
LOGICAL(2), INTENT(IN) :: AfterSlide
!DEC$ ATTRIBUTES REFERENCE :: AfterSlide
CHARACTER(LEN=*), INTENT(IN) :: sectionTitle ! BSTR
INTEGER, INTENT(OUT), VOLATILE :: newSectionIndex
!DEC$ ATTRIBUTES REFERENCE :: newSectionIndex
INTEGER(4), INTENT(OUT), OPTIONAL :: $STATUS ! Method status
!DEC$ ATTRIBUTES REFERENCE :: $STATUS
INTEGER(4) $$STATUS
INTEGER(INT_PTR_KIND()) invokeargs
invokeargs = AUTOALLOCATEINVOKEARGS()
CALL AUTOADDARG(invokeargs, '$ARG1', Index)
CALL AUTOADDARG(invokeargs, '$ARG2', AfterSlide)
CALL AUTOADDARG(invokeargs, '$ARG3', sectionTitle, AUTO_ARG_IN, VT_BSTR)
CALL AUTOADDARG(invokeargs, '$ARG4', newSectionIndex, AUTO_ARG_OUT)
$$STATUS = AUTOINVOKE($OBJECT, 2090, invokeargs)
IF ($$STATUS == DISP_E_EXCEPTION) CALL $$DisplayError(invokeargs)
IF (PRESENT($STATUS)) $STATUS = $$STATUS
CALL AUTODEALLOCATEINVOKEARGS (invokeargs)
END SUBROUTINE $Presentation_NewSectionAfter
The argument flagged up has the VOLATILE attribute. Why does the compiler issue the warning inside an interface definition when INTENT(OUT) arguments are never given an explicit value? Is this a compiler bug or am I not fully understanding the situation?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you look at the interfaces for AUTOADDARG in IFAUTO.f90 you will see the value arg has intent(in) therefore in the caller it cannot be a var that has intent(out). The error message is correct. The newSectionIndex declaration I would suggest wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Andrew, these arguments appear to have been incorrectly created by the Fortran Module Wizard. In the earlier post we found other probable errors in the generated COM/Auto interface and variable definitions for the Powerpoint application.
I will check all such similar warnings in my PPT, Word & Excel COM interfaces to verify they match the definitions in ifauto and ifcom modules.
Thanks,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It may be the data structures in the Powerpoint com are incorrect in this case so Mod Wiz just did what it was told. I looked at http://underpop.online.fr/m/microsoft-powerpoint/help/presentation-newsectionafter-method.html.gz which suggests it is intent(in).

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