[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59150] Parse error when concatenating strings
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines |
Date: |
Mon, 21 Sep 2020 19:54:39 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 |
Follow-up Comment #4, bug #59150 (project octave):
I think Matlab is also flummoxed, but that Octave should probably treat
continuation as equivalent to " ...".
In Matlab, matrix concatenation with character vectors acts as though there
was a space. The motivating example produces
T = [...
'A'...
'B']
T = 'AB'
If the line continuation replaced the newline and added a space the new code
would be
T = [ 'A' 'B']
which on Octave would also produce the row string vector 'AB'.
To test my understanding, I tried using a comma as the joining character and
it works both ways.
T = [...
'A'...
,'B']
T = 'AB'
OR
T = [...
'A',...
'B']
The second case illustrates that it isn't a continuation operator followed
immediately by a character that is the problem.
Also, here's another example that doesn't use strings but that doesn't
concatenate properly in Octave.
T = [...
{1}...
{2}]
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59150>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59150] Par error when concatenating strings from multiple lines, Guillaume, 2020/09/20
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, Rik, 2020/09/21
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, John W. Eaton, 2020/09/21
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, Guillaume, 2020/09/21
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines,
Rik <=
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, John W. Eaton, 2020/09/21
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, Guillaume, 2020/09/22
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, John W. Eaton, 2020/09/22
- [Octave-bug-tracker] [bug #59150] Parse error when concatenating strings from multiple lines, Rik, 2020/09/22