Compatibility: Difference between revisions

Jump to navigation Jump to search
90 bytes added ,  30 November 2011
→‎Are we running octave?: why are we using persistent
m (small fixes (should use preview more often))
(→‎Are we running octave?: why are we using persistent)
Line 5: Line 5:


== Are we running octave? ==
== Are we running octave? ==
The most commonly used trick is to create a subfunction that will check whether we are in octave or not, and use it as condition to run selected block of code that are incompatible.
The most commonly used trick is to create a subfunction that will check whether we are running octave, and use it as condition to run selected block of code that are incompatible. Due to the persistent variable it can be called repeatedly without a heavy performance hit.


  function foo
  function foo

Navigation menu