Author Topic: Suggest to change the fortran wizard file extension  (Read 9908 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6079
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Suggest to change the fortran wizard file extension
« on: October 22, 2010, 07:33:00 am »
Hi, my friend xunxun1982 has give some suggestion on change the FORTRAN file extension.

1. rename the main.f95 to main.f90.
because .f95 is not widely supported, such as Compa Visual Fortran, this compiler only support Fortran90 standard and the .f90 extension file. But .f90 is widely supported by all the fortran compiler like Fortran95 2003 2008 standard.

2. change the content of main.f90
original content

Code
       program main
       implicit none
       integer re_i
       write(*,*) "Hello World!"
       re_i = system("pause")
       end


reason:
Code
re_i = system("pause") 
the statement above: system is not a native Fortran function, it is a compiler extension (gfortran/g95/intel supported, but not sure other fortran compiler)

changed content:

Code
       program main
       implicit none
       write(*,*) "Hello World!"
       stop
       end


Any ideas from Fortran users??

thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Suggest to change the fortran wizard file extension
« Reply #1 on: October 23, 2010, 04:26:44 pm »
Commit it? any comment?
 :lol:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Suggest to change the fortran wizard file extension
« Reply #2 on: October 23, 2010, 08:54:13 pm »
because .f95 is not widely supported, such as Compa Visual Fortran, this compiler only support Fortran90 standard and the .f90 extension file.
Well - that's one of the #1 choices or a Fortran compiler so I'd say it *is* widely known and supported. Furthermore Fortran users are usually known to be very conservative. in fact all Fortran devs I know (and these are many in my domain) are still using Fortrtan77. What extension does GNU GFortran suggest?

As for the system() call I agree, but the extension is really not worth changing. Depending on the user's habits one argues this way, the other will argue the opposite. As long as C::B supports both extensions natively through "file types and extensions" it's just fine.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Suggest to change the fortran wizard file extension
« Reply #3 on: October 24, 2010, 09:36:58 am »
because .f95 is not widely supported, such as Compa Visual Fortran, this compiler only support Fortran90 standard and the .f90 extension file.
Well - that's one of the #1 choices or a Fortran compiler so I'd say it *is* widely known and supported. Furthermore Fortran users are usually known to be very conservative. in fact all Fortran devs I know (and these are many in my domain) are still using Fortrtan77. What extension does GNU GFortran suggest?

As for the system() call I agree, but the extension is really not worth changing. Depending on the user's habits one argues this way, the other will argue the opposite. As long as C::B supports both extensions natively through "file types and extensions" it's just fine.

I agree with you, and the Fortran Programmers around me generally use the extension name ".f" or ".for" (Fortrtan77, old programs, hardly to read and maintain) and ".f90" (Fortran 90 95 2003, new programs, easily to read and maintain) . In fact, I think the Fortran Project in CB should provide ".f", ".f90", ".f95", just like C/C++ Console Project.
Regards,
xunxun

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Suggest to change the fortran wizard file extension
« Reply #4 on: October 24, 2010, 08:36:31 pm »
In fact, I think the Fortran Project in CB should provide ".f", ".f90", ".f95", just like C/C++ Console Project.
That's what C::B does and that won't change. The question here only was about what the extension for the file created by the wizard shall be.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Suggest to change the fortran wizard file extension
« Reply #5 on: October 24, 2010, 10:23:46 pm »
I would say configurable in the wizard :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]