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

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

[Octave-bug-tracker] [bug #63556] error() function shows traceback messa


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #63556] error() function shows traceback messages when error message end with newline in special cases
Date: Wed, 21 Dec 2022 13:50:25 -0500 (EST)

Update of bug #63556 (project octave):

              Item Group:       Inaccurate Result => Documentation          
                  Status:                    None => Confirmed              
         Planned Release:                    None => 8.1.0 (current stable) 

    _______________________________________________________

Follow-up Comment #2:

Single-quoted strings behave the same in Octave and in Matlab.
Double-quoted strings used to be Octave-specific and differ from single-quoted
strings in that escape sequences (like "\n") are evaluated (like `fprintf`
does). E.g., compare the result of `numel('\n')` with `numel("\n")` in
Octave.
(Unrelated to this issue: Double-quotes now create string objects in Matlab.
Those are incompatible to Octave's double-quoted strings.)

The error function works like `fprintf` only if there are additional arguments
after the template. That means the examples that use one single single-quoted
input argument don't end with a newline character. But they end with "n".
Hence, the traceback is included in the displayed error message.

The documentation could probably be improved to better point that out.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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