POV-Ray : Newsgroups : povray.binaries.images : Reading in code line by line? : Re: Reading in code line by line? Server Time
30 Jul 2024 10:21:54 EDT (-0400)
  Re: Reading in code line by line?  
From: Thomas de Groot
Date: 17 Dec 2011 07:42:36
Message: <4eec8e3c$1@news.povray.org>

> High!
>
> As I announced recently, I would like to add a code display feature to
> my includes presentation table (see attachment). So I would like to know
> whether it is possible to read ASCII text line by line via #read... the
> manual says data to be read in have to be separated by commas. The other
> way would be to explicitly store the whole text "manually" into an array
> whose contents then are rendered in the display section of the table's
> glass lid... but this appears rather clumsy to me!

Yes, that is possible indeed. Write a file with each text item separated 
by commas (and I think they also should be within " ", not sure 
however), then read the file using:

   #while (defined(your text file))
     #read (....)
     ....
   #end

and apply each read text item to where/what you intend. Reading will 
automatically stop when reaching the end of the file.

>
> And, concerning the rendering of the test version - why is the red
> transparent text not completely cast as shadow?
>
I cannot tell just from the image unfortunately.

Thomas


Post a reply to this message

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