octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51988] Interpreter error with multiword comma


From: anonymous
Subject: [Octave-bug-tracker] [bug #51988] Interpreter error with multiword commands previously used as variables
Date: Sun, 10 Sep 2017 18:48:28 -0400 (EDT)
User-agent: Mozilla/5.0 (Android 7.0; Mobile; rv:55.0) Gecko/55.0 Firefox/55.0

URL:
  <http://savannah.gnu.org/bugs/?51988>

                 Summary: Interpreter error with multiword commands previously
used as variables
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sun 10 Sep 2017 10:48:27 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The statement "axis equal;" kept triggering a parse error in a script foo.m
but it was restricted to that specific file foo.m and no others. After *much*
hair-pulling, including searching for invisible Unicode characters, it turned
out that there had been a previous variable named axis, long since cleared by
the time "axis equal" was called with its graphics meaning.

In foo.m, the variable axis was renamed and the problem stopped. But when most
variables are cleared and then invoked, Octave either invokes a function or
script by that name or gives a "reference to cleared variable" error. A bald
"parse error" is triggered only by certain two-word commands like "hold on"
and "axis equal" and "format compact" -- it appears that the interpreter gets
confused with the use of a command that used to be a variable for those
multi-word forms alone. However calling axis "equal" with the argument in
quotes does work  even without patentheses -- cleared variables stay cleared
and the interpreter does not error out.

If this behavior must remain the way it is, please consider changing the parse
error to "Parse error (was this command used earlier as a variable?)".




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51988>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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