[Top][All Lists]

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

Re: use end or endif is indifferent?

From: Nicholas Jankowski
Subject: Re: use end or endif is indifferent?
Date: Thu, 29 Nov 2018 10:24:09 -0500

On Thu, Nov 29, 2018 at 10:17 AM Luca Manzari <address@hidden> wrote:
Octave already treats whatever follows % as a comment, so nothing
prevents you from writing end%if or end%for already. Doing so makes for
code that is both Octave and Matlab compatible.

it's compatible, but as mentioned earlier using end instead of endif loses Octave's 'advanced diagnostic abilities'.  end%if is still just end as far as Octave is concerned.  I can't imagine, though, the level of interpreter changes that would be required to have it selectively parse something that would otherwise be handled as a comment, and the number of false parses this could generate.

reply via email to

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