[Top][All Lists]

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

[Octave-bug-tracker] [bug #56881] Command line functions are visible fro

From: Rik
Subject: [Octave-bug-tracker] [bug #56881] Command line functions are visible from m files
Date: Fri, 13 Sep 2019 17:13:09 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #12, bug #56881 (project octave):

I think the end state--capricious code that executes variably and where it is
difficult to debug the root cause--is to be avoided.

I was suggesting something like an opt-in, in the same way a programmer has to
use the keyword global, if they really want to import a command line

Issuing a warning is also fine with me because it makes it obvious that there
is a potential issue, and it is up to the programmer to make the judgment

Matlab, as usual, is of no help.  The following script is allowed (i.e., it
runs) and it emits no warnings, and the output is "Hello", not 0.14112.

which sin
sin (3)

function y = sin (x)
    disp ('Hello');

I don't think the situation we are trying to address comes up very often so I
would only modify things if it were easy.  But, assuming it was easy, it would
be nice to get a shadowed warning message whenever a function is added to the
symbol table.


Reply to this item at:


  Message sent via Savannah

reply via email to

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