[Top][All Lists]

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

[Octave-bug-tracker] [bug #62552] In-place operator spacing works for 'i

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #62552] In-place operator spacing works for 'i' and 'j', but not other variable names
Date: Fri, 3 Jun 2022 00:08:04 -0400 (EDT)

Follow-up Comment #26, bug #62552 (project octave):

The code in pt-idx.cc where the error message occurs is

if (is_var && is_word_list_cmd ())
  error ("%s used as variable and later as function", nm.c_str ());

This code is executed while evaluating the index expression, not when parsing
it.  Since we know that it is a word-list command, then yes, we could change
the error to "variable %s used in command-style function call".

IF we check to see whether the initial characters of the first argument in the
word-list command match a binary operator, then we could issue a warning like
you suggest: "spacing around %s operator makes variable %s appear to be used
in command-style function call".


Reply to this item at:


Message sent via Savannah

reply via email to

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