POV-Ray : Newsgroups : povray.general : How does povray read a file? : Re: How does povray read a file? Server Time
5 Aug 2024 06:16:50 EDT (-0400)
  Re: How does povray read a file?  
From: hughes, b 
Date: 13 Nov 2002 19:40:55
Message: <3dd2f117@news.povray.org>
"Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote in message
news:3dd2bea7$1@news.povray.org...
> Thanks greatly .  But your example has povray reading something already
set
> up in SDL. You're adding "\n" 's and so forth.  What if there's no "\n"?
> Suppose I have some more sophisticated files which are too big to
hand-edit
> into SDL-compatible code.
> Is povray capable of reading these, and if so could you humor me by
showing
> an example.
>
> just a generic idea of code that enables it to read "whatever's there."
> Then I can do my own "parsing" of the data, perhaps looking for commas and
> the like.

It's an interesting problem. I don't know of a way around the need for
quotes or commas for this kind of thing. Sorry. POV-Ray will always see a
lone word or number or symbol as being the proverbial undeclared identifier.
If it were all put into a single pair of quotation marks then perhaps it
could be dissected into parts of the string but way too difficult I'd think.

The \n for carriage returns or line feeds isn't needed though, I had only
done that to match up with your example for list of names. Commas are
important, needed for separating the data into discrete pieces.
Seems your real need might be to check into using some program that does
CSV, comma separated values. Whatever that may entail I wouldn't know. A
raw, ordinary, word just isn't going to work right anyhow though. Well, from
my experience it can't.


Post a reply to this message

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