[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62552] Operator spacing works for i and j but
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #62552] Operator spacing works for i and j but no other variables |
Date: |
Tue, 31 May 2022 16:57:33 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62552>
Summary: Operator spacing works for i and j but no other
variables
Project: GNU Octave
Submitter: arungiridhar
Submitted: Tue 31 May 2022 04:57:31 PM EDT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 7.1.0
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 31 May 2022 04:57:31 PM EDT By: Arun Giridhar <arungiridhar>
This is based on a user report at
https://octave.discourse.group/t/strange-behaviour-of-operator/2755
The ++ and -- operators need to hug their operands, but does that rule extend
to the += and friends as well? If yes, then i and j are not triggering that
error. If not, then variables other than i and j need to be allowed that
spacing.
Calling this a missed error since i and j do not trigger the spacing error,
but please reclassify it if that is not right.
octave:3> i = 0; i += 1; i+=1; i +=1; i+= 1;
octave:4> j = 0; j += 1; j+=1; j +=1; j+= 1;
octave:5> k = 0; k += 1; k+=1; k +=1; k+= 1;
error: k used as variable and later as function
octave:7> k +=1
error: k used as variable and later as function
octave:8> i +=1
i = 5
octave:9> j +=1
j = 5
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62552>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62552] Operator spacing works for i and j but no other variables,
Arun Giridhar <=