POV-Ray : Newsgroups : povray.general : something doesn'w work with concat and str : Re: something doesn'w work with concat and str Server Time
29 Jul 2024 00:29:25 EDT (-0400)
  Re: something doesn'w work with concat and str  
From: Larry Hudson
Date: 1 Dec 2013 16:23:13
Message: <529ba8c1$1@news.povray.org>
On 12/01/2013 12:22 PM, Anthony D. Baye wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> I had to think a bit deeply to find the /why/ of this; it has to do with
>> the way string literals are interpreted. See the off-line docs section
>> 3.3.1.9.1 String Literals, or in the online wiki:
>> http://wiki.povray.org/content/Reference:Strings#String_Literals
>>
>> Thomas
>
> This is a natural effect of using escaped characters in strings (special
> characters like non-printing characters \t and \n or \b).  One of the dumber
> things windows does is use back-slash instead of forward-slash in directory
> paths, so you have to escape the backslash "\\" to get it to render properly in
> a string.
>
> Regards,
> A.D.B.
>
>
It seems that it's not well known, but Windows _does_ accept forward slashes in path
strings, 
when they come from a program.  It's the Windows command processor that only accepts
the back 
slashes -- that is, when you are typing a command directly in Windows.

When the string comes from a program and not directly from the keyboard, the command
processor 
is bypassed, and both forms are accepted.  Definitely saves the headaches of trying to
remember 
to double the backslashes in path strings in a source-code file.

      -=- Larry -=-


Post a reply to this message

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