octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #59065] New line in first argument of 'input'


From: Rik
Subject: [Octave-bug-tracker] [bug #59065] New line in first argument of 'input'
Date: Fri, 4 Sep 2020 17:21:56 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36

Update of bug #59065 (project octave):

                Priority:              5 - Normal => 3 - Low                

    _______________________________________________________

Follow-up Comment #1:

Hmmm, this is wrapped up in the distinction Octave makes between double-quoted
strings and single-quoted strings.  Escape characters are processed in
double-quoted strings so this works in Octave (and Matlab):


a = input ("line1\nline2\nline3: ")


If you want to process escape characters within single-quoted strings in
Octave you need to use something like the sprintf() function.


a = input (sprintf ('line1\nline2\nline3: '))


This probably only gets addressed permanently if we decide to drop support for
double-quoted character arrays and then re-use the '"' character to indicate
string array as Matlab now does.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59065>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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