POV-Ray : Newsgroups : povray.bugreports : Can't print "\a" Server Time
22 Dec 2024 14:52:26 EST (-0500)
  Can't print "\a" (Message 1 to 1 of 1)  
From: Warp
Subject: Can't print "\a"
Date: 13 Jun 2000 15:28:54
Message: <39468b76@news.povray.org>
I don't know if this is really a bug or just a known deficiency, since
the povray documentation doesn't seem to state that it has to be possible.
  The problem is that it's not possible to put a backlash followed by a
meaningful letter (like \a, \b or \n) in a string so that it will be output
as is to a stream.
  For example, if I want the following:

abc\abc

to be printed to the #debug stream, it doesn't seem to be possible (at least
not with a single string).
  If I try this:

#debug "abc\abc"

what I get is a beep and this is printed:

abcbc

  This is what one would expect (since \a is a bell, I think?). However,
having coded a lot in C, I would expect to be able to print the backslash
by putting a double backslash in the string, ie:

#debug "abc\\abc"

  However, this doesn't work. The result is the same as in the previous one,
ie. a beep and "abcbc" is printed.
  A double backslash seems to have some special meaning, though, because if
I try this:

#debug "abc\\\abc"

I get no beep and this is printed:

abc\\abc

  (Similarly if I try to print "\\\n" then "\\n" is printed, and so on.)

  It seems that it's not possible to print just one backslash.

  This happens with my Sun Solaris compile of povray 3.1g.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.