Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: gd_on on October 26, 2007, 10:16:19 am

Title: Does codestat plugin support fortran language ?
Post by: gd_on on October 26, 2007, 10:16:19 am
If I try codestat plugin on a Fortran project, it says me "The project is empty", though it's not. Probably it's because codestat supports only C and C++ project, not Fortran... In that case, the message should be something like "Language not supported".
Fortran support : Could it be a future enhancement ?
Thanks
gd_on
Title: Re: Does codestat plugin support fortran language ?
Post by: Zlika on November 05, 2007, 03:05:27 pm
Hi gd_on,
You can add other languages for codestat in the option menu. However, Fortran comments are very particular (if I remember well, it can depend on the position of the first caracter on the line, can use different kind of caracters...).
Up to now, codestat can only be configured for "classical" comments (i.e. single line comments (for example, comments beginning by "//" in C++) or multi-line comments (for example, "/*" and "*/" comments in C)).
However, if you use Fortran 90 and only has comments beginning by "!", you can configure this "single line" fortran comment in the codestat options.
Title: Re: Does codestat plugin support fortran language ?
Post by: gd_on on November 05, 2007, 06:39:58 pm
Thanks for the answer.
I use mainly Fortran 77, sometimes Fortran 90.
If I put a C in single line comment, it works better, but it counts wrongly a line beginning at column 7 by a C, as a comment. (for ex. C=55.).
A line beginning in column 1 by a C is a comment, but that's all (in f77). In F90 it might be different.
And, characters following a ! are considered as comment (if the ! is not in a string).
Both C in column 1 and ! everywhere could be considered as a single line comment, but is it possible to configure the plugin to have these two characters recognized ?

gd_on
Title: Re: Does codestat plugin support fortran language ?
Post by: Zlika on November 17, 2007, 05:05:18 pm
Hi,
It's not possible to detect a comment based on the column number.
However, if you have some free times, you can try to update the plugin to do that.

Zlika