octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: odepkg: odeset profile tests


From: Doug Stewart
Subject: Re: odepkg: odeset profile tests
Date: Wed, 3 Dec 2014 09:24:05 -0500



On Wed, Dec 3, 2014 at 8:22 AM, Doug Stewart <address@hidden> wrote:


On Wed, Dec 3, 2014 at 5:29 AM, Carlo De Falco <address@hidden> wrote:

On 2 Dec 2014, at 18:29, Carlo De Falco <address@hidden> wrote:

> Furthermore, it seems fuzzy_compare would need to go into Octave core as well, but as it is now
> it is absolutely not acceptable, formatting, documentation and comments
> (too many useless and annoyingly verbose comments don't make the code more readable)
> all need a lot of improvement.

looking at other functions that should maybe go into core, there still lots
of style fixes to be done, for example:

- '%#' as comment should be '##' for indented comments at beginning of line,
  '#' for inline comments

- remove reduntant and annoyingle verbose comments.

  for example in <https://bitbucket.org/robs88/octave-odepkg/src/df11f2a32e4bc192ca6f2a3d22bead4085cbbfc7/inst/ode23.m?at=default#cl-330> :

   if (vmassdependence) %# constant mass matrices have already
     ...
   else                 %# if (vmassdependence == false)
     ...
   endif

  the comments beside 'if' and 'else' are not really required nor helpful.

  If the code is not clear enough, either make the code clearer or add the required
  info in the documentation.

  Only use inline comments when you are doing something very nonstandard or to point
  out something that should be fixed later.

- single- and double-quoted strings have different meaning in Octave, unless you really
  want to use single-quoted for a specific reason, prefer using double-quoted.

- use "!" instead of "~" for negation, leave a space between the negation operator and
  the negated quantity.

- break long lines

- leave a space before and after arithmetic operators

- leave a space after a ',' in argument lists.

HTH,
c.







This is a job that I can do.
I am working on ode23.m unless someone else has started already.
Doug Dtewart 

-

1)  There are hundreds of changes to this file. do you want it as a big hg changset???  
2)  3 dots (...)  are used for line continuation, is this still the way we do it?
Doug

reply via email to

[Prev in Thread] Current Thread [Next in Thread]