POV-Ray : Newsgroups : povray.general : Reading from a text file : Re: Reading from a text file Server Time
29 Jul 2024 16:23:29 EDT (-0400)
  Re: Reading from a text file  
From: Thomas de Groot
Date: 6 Jan 2012 10:19:13
Message: <4f0710f1$1@news.povray.org>
On 6-1-2012 15:20, Christian Froeschlin wrote:
> Thomas de Groot wrote:
>> It seems to me that arrays are unduly complicated in use here.
>> Personally, I would prefer the following:
>>
>> #fopen MyFile "myData.txt" read
>> #while (defined(MyFile))
>> #read (MyFile,Vector)
>> #end
>
> but for this you need a way to specify that a vector
> should be read instead of a scalar, either by introducing
> typed variables or requiring additional parameters.
I cannot pretend to know exactly what you mean :-) but in my simple 
vision and use of this, I write and then read a vector (or a float or 
whatever, e.g. text) according to my needs. You only have to take care 
that you use a vector as such or a text as such and not make a 
hotchpotch of things. #read reads and interprets what is between the 
commas: if this is a vector, it reads a vector, etc. doesn't it?

Thomas


Post a reply to this message

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