help-octave
[Top][All Lists]
Advanced

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

Re: A way to make octave ignore certain lines? Specifically coder.*


From: Robb
Subject: Re: A way to make octave ignore certain lines? Specifically coder.*
Date: Tue, 12 Jul 2016 16:49:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 07/12/2016 04:08 PM, Mike Miller wrote:
On Tue, Jul 12, 2016 at 15:48:30 -0500, Robb wrote:
I did do this and it ended up working at first:
coder.cstructname=@()[]

Unfortunately the function sometimes is called with functions that I would
rather be ignored. Such as:


coder.cstructname("foostring", foofunction);

This solution still evaluates the foofunction, really I would like this line
skipped over completely.

I certainly can wrap everything thing in
if exist('OCTAVE_VERSION', 'builtin') == 0,

but I was hoping for something a little more transparent on the matlab side
of things.

Interesting. This would mean parser support for completely ignoring
evaluation of such lines.

In that case, the best you can do at this point is probably something
like

  sed -i 's/^\s*coder\./## &/' *.m

and maybe report a bug if you think it's important that Octave grow this
feature in a future version.

Yes, sed would work, but I was thinking about going into the code base and seeing if I could do it from their. I was hoping there would be a hook somewhere I could write and drop into my octave installation to make it ignore those lines.

 Regardless, thanks for the tip.




reply via email to

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