Code Comments
Programming Forum and web based access to our favorite programming groups.Arjen Markus wrote: > KC wrote: > > You can do this using g95 (that is the GNU > compiler for Fortran 90/95): Perhaps "the GNU compiler" should be replaced with "a GNU compiler", since gfortran exists :). > Via the contains statement you can introduce new subroutines and > functions > that can only be accessed by each other and the containing routine: > > subroutine suba( ... ) > ... > call subb( ... ) > .... > contains > subroutine subb( ... ) > write(*,*) 'In subb!' > end subroutine subb > > subroutine subc( ... ) > ... > end subroutine subc > > end subroutine suba > > (The same for main programs). Modules are even more useful, because > more general. Is this part of Fortran 2003 or is it an extension specific to g95?
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.