[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61533] strrep incorrect results or error
From: |
Liang Tang |
Subject: |
[Octave-bug-tracker] [bug #61533] strrep incorrect results or error |
Date: |
Tue, 23 Nov 2021 12:13:56 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0 |
URL:
<https://savannah.gnu.org/bugs/?61533>
Summary: strrep incorrect results or error
Project: GNU Octave
Submitted by: lt1234
Submitted on: Tue 23 Nov 2021 05:13:55 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: lt1234
Originator Email:
Open/Closed: Open
Release: 6.3.0
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Details:
Conversion from '\' to '/' on Windows may result in unexpected results. I
have been mixing '&' and "&", assuming that the two pairs are the same. For
these, I think it has something to do with escape sequence.
This is what I expected:
>> strrep('C:\Users\Owner\Desktop\', '\', '/')
ans = C:/Users/Owner/Desktop/
These are unexpected:
(1) Unexpected:
>> strrep("C:\Users\Owner\Desktop\", '\', '/')
error: parse error:
syntax error
>>> strrep("C:\Users\Owner\Desktop\", '\', '/')
^
(2) Unexpected:
>> strrep('C:\Users\Owner\Desktop\', "\", "/")
error: parse error:
syntax error
>>> strrep('C:\Users\Owner\Desktop\', "\", "/")
^
(3) Unexpected: ^
>> strrep("C:\Users\Owner\Desktop\", '\', '/')
error: parse error:
syntax error
>>> strrep("C:\Users\Owner\Desktop\", '\', '/')
(4) Unexpected wrong result, no error:
^
>> strrep("C:\Users\Owner\Desktop", '\', '/')
ans = C:UsersOwnerDesktop
(5) Unexpected:
strrep("C:\Users\Owner\Desktop", "\", "/")
error: parse error:
syntax error
>>> strrep("C:\Users\Owner\Desktop", "\", "/")
^
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61533>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61533] strrep incorrect results or error,
Liang Tang <=