octave-maintainers
[Top][All Lists]
Advanced

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

Re: disp and do_string_escapes


From: Jaroslav Hajek
Subject: Re: disp and do_string_escapes
Date: Thu, 15 Jul 2010 07:22:18 +0200

On Tue, Jul 13, 2010 at 6:19 PM, CdeMills <address@hidden> wrote:
>
> Hello,
>
> do_string_escapes(char(7))
>
> displays the string "^G" (in red); but
>
> disp(do_string_escapes(char(7)))
>
> produces a beep. Is there some way to display a string with special
> characters kept under their escaped form ?
>
> Regards
>

do_string_escapes actually converts *from* escapes *to* special chars.
The red ^G must be a feature of your terminal (I don't see it). What
you probably want is undo_string_escapes:

octave:1> undo_string_escapes (char(7))
ans = \a

Yes, the docstring is wrong, it should be fixed.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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