|
From: | Mike Miller |
Subject: | [Octave-bug-tracker] [bug #42432] Error with octave when using from Perl via Inline::Octave |
Date: | Tue, 5 Feb 2019 14:09:17 -0500 (EST) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36 |
Follow-up Comment #8, bug #42432 (project octave): I just noticed that a viable workaround is to use the hack of prepending a statement so that Octave knows that stdin is a script, not a function file: $ echo "function x = myfunc (u) x = u + 1; endfunction; myfunc(3)" | octave warning: function name 'myfunc' does not agree with function filename '' error: 'myfunc' undefined near line 1 column 42 $ echo "1; function x = myfunc (u) x = u + 1; endfunction; myfunc(3)" | octave ans = 4 This seems eminently simple and consistent with the way that Octave already handles function files and script files. Can we just close this with the wisdom that inline scripts passed to stdin should start with a non-function-declaration statement? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?42432> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |