[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44860] "hold on" in single-line if not parsed
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #44860] "hold on" in single-line if not parsed correctly |
Date: |
Fri, 17 Apr 2015 07:39:39 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33 |
Follow-up Comment #1, bug #44860 (project octave):
Are you sure it is a bug?
Simply adding a comma or semicolon between the if statement proper and the
following statements makes it work:
holding = ishold(); if(0 == holding), hold on; end
I hit this issue myself many years ago and since then always added that
semicolon. IMO it simply is better coding style as well.
IIRC it was also needed on at least older Matlab versions (but I'm not sure,
never checked on newer ones)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44860>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/