fortran support
fulvio ciriaco <[email protected]> Sat, 17 Jan 2015 09:06:09 +0100
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
Hello, I have been trying cedet for fortran development these days. It appears to me that semantic features work only inside program sections but not inside modules. Inside a program most features work as expected, even used modules are parsed. However inside a module, not even completions for subroutines contained in the body complete. Unfortunately, most programming happens inside modules! Semantic works as expected if I add use clauses inside the subroutines, so what is missed is probably only the fact that the module body should inherit all the use clauses of the module and also the module declarations. I attach the module testmodule.f90 of cedet itself with a subroutine "testcompletion" at the bottom prepared for testing and another "testcompletionb" with a use clause inside where semantic works as expected. Ah, I am using cedet from git with emacs 24.4.1 Thank you Fulvio ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Cedet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-devel
testmodule.f90
(text/x-fortran, 1.3 KB)
! For testing of Fortran 90 modules ! David Engster <[email protected]> module testmodule implicit none type :: myModType integer :: one,two real :: three end type myType ! interface for external sub interface subroutine externalSub(arg1,arg2,arg3) integer :: arg1 type(myModType) :: arg2 real :: arg3 end subroutine externalSub end interface ! interface for polymorphism interface externalPolySub subroutine polySub_1(arg1,arg2) integer :: arg1,arg2 end subroutine polySub_1 subroutine polySub_2(arg1,arg2) real :: arg1,arg2 end subroutine polySub_2 end interface polySub contains double precision function myModFunc(arg1,arg2) double precision :: arg1,arg2 myModFunc = arg1*arg2 end function myModFunc subroutine myModSub(arg1,arg2) integer,intent(in) :: arg1 integer,intent(out) :: arg2 arg2=2*arg1 end subroutine myModSub subroutine testcompletion() real:: a call myM !try completion to mymodsub here a=myM !should complete to mymodfunc end subroutine testcompletion subroutine testcompletionb() real:: a use testmodule call myModSub !try completion to mymodsub here a=myM !should complete to mymodfunc end subroutine testcompletionb end module testmodule