[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65877] struct field assignment using {:} prod
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #65877] struct field assignment using {:} produces invalid dimension error |
Date: |
Tue, 23 Jul 2024 17:28:03 -0400 (EDT) |
Update of bug #65877 (group octave):
Priority: 5 - Normal => 3 - Low
Item Group: Unexpected Error or Warning => Matlab Compatibility
_______________________________________________________
Follow-up Comment #2:
Confirmed as well on development branch. However this has easy workarounds
that are probably clearer code anyways. I'm lowering the priority. Because
Matlab does accept this construct, I'm changing the Group to "Matlab
Compatibility".
The issue is that the code '{:}' is asking the interpreter to look up the
variable value for 'A.a', but that variable doesn't exist. One could, as
Matlab has done, check to see that this is an assignment to a non-existent
variable and thus suppress the error message and proceed with assignment.
But, it is clearer to just assign a cell array to the desired variable.
A.a = {1};
That is clear as to intent.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65877>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #65877] struct field assignment using {:} produces invalid dimension error,
Rik <=