help-octave
[Top][All Lists]
Advanced

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

Re: use end or endif is indifferent?


From: inor0627
Subject: Re: use end or endif is indifferent?
Date: Thu, 29 Nov 2018 01:00:59 -0600 (CST)

Sergei Steshenko wrote
> On Wednesday, November 28, 2018, 7:52:48 PM GMT+2, Marco Atzeri <

> marco.atzeri@

> > wrote:  
>  
> you can use "end" instead of "endif" for closing
> a "if" statement, but it is not recommended
> 
> https://octave.org/doc/interpreter/Statements.html#index-end-statement

Hello Sergei,

this is correct for Octave, but please keep in mind that Matlab (2016a) does
not support "endif" and "endfor". So when you have to cooparate with people
using Matlab, you could instead use "end%if" and "end%for" which will
increase readability of your code, though you will losse Octave's advanced
diagnostic abilities as mentioned in your link.

inor



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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