[Scilab-users] Strange behaviour of the auto-indent ctrl + i

2017-02-24 Thread Pierre Vuillemin

Hello all,

I've just realised that block-comments are now available in Scilab 6 and 
I find it quite convenient. I've noticed strange behaviour when using 
the auto-indent tool ctrl + i in scinote though.


For instance with this code



// Author : Pierre Vuillemin (2017)
// License : GNU GPL

function problem = sopi_max(fun, varargin)
   /*
   Creates a maximisation problem.

   Calling Sequence
  problem = sopi_max(fun)
  problem = sopi_max(fun, c1, ..., cn)

   Parameters
  fun  : the objective function (sopiVar)
  ci   : constraints (sopiCst or list of sopiCst)
  problem  : the optimisation problem (sopiPro)

   See also
  sopi_var
  sopi_min
  sopi_solve
  sopi_example
   */
   problem = sopi_min(-fun, varargin(:))
endfunction


the auto-ident tool adds strange indentation to the endfunction + it 
suppress the indentation of the text withing the block comment. 
Shouldn't it behave as if // were used?


Regards,

Pierre
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Strange behaviour of the auto-indent ctrl + i

2017-02-24 Thread Paul Bignier


Hi Pierre,

The handling of comments looks buggy indeed, could you please report a 
bug  
with the test-case?

Thanks!

Regards,
Paul

On 02/24/2017 10:01 AM, Pierre Vuillemin wrote:

Hello all,

I've just realised that block-comments are now available in Scilab 6 
and I find it quite convenient. I've noticed strange behaviour when 
using the auto-indent tool ctrl + i in scinote though.


For instance with this code



// Author : Pierre Vuillemin (2017)
// License : GNU GPL

function problem = sopi_max(fun, varargin)
   /*
   Creates a maximisation problem.

   Calling Sequence
  problem = sopi_max(fun)
  problem = sopi_max(fun, c1, ..., cn)

   Parameters
  fun  : the objective function (sopiVar)
  ci   : constraints (sopiCst or list of sopiCst)
  problem  : the optimisation problem (sopiPro)

   See also
  sopi_var
  sopi_min
  sopi_solve
  sopi_example
   */
   problem = sopi_min(-fun, varargin(:))
endfunction


the auto-ident tool adds strange indentation to the endfunction + it 
suppress the indentation of the text withing the block comment. 
Shouldn't it behave as if // were used?


Regards,

Pierre
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


--
Paul BIGNIER
Development engineer
---
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.68
http://www.scilab-enterprises.com

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users