POV-Ray : Newsgroups : povray.advanced-users : file reading mistake : Re: file reading mistake Server Time
28 Jul 2024 16:15:25 EDT (-0400)
  Re: file reading mistake  
From: Alain
Date: 24 Jun 2006 12:44:02
Message: <449d6bd2$1@news.povray.org>
Viktor nous apporta ses lumieres en ce 23/06/2006 13:22:
> I have another strange "read" issue. Indeed I only want to transfer
> variables from one frame to another, but A LOT of them. My file goes like
> this:
> 
> -0.00164469
> -0.0512107
> 0
> -0.612596
> -0.609269
> -0.605894
> -0.602472
> 
> When I read that in, by using a simple
> #read (DATA, newVar)
> the line with the "0" is simply ignored - instead of the 0 being saved in
> "newVar". I have to convert the lines with "0" to "-0.0" ("0.0" isn't
> enough) to prevent that. Is this a feature or...?
> 
> Regards,
> Viktor.
> 
> 
> 
> 
It reads the data as: -0.00164469, -0.05121070 (note the extra zero), -0.612596,
-0.609269, 
-0.605894, -0.602472
The lone 0 is treated as the last digit of the preceding value. Another integer would
have been 
treated the same way, but would have been easier to spot as it would have altered the
preceding value.
Put a comma after each value but the last.

-- 
Alain
-------------------------------------------------
A short cut is the longest distance between two points.


Post a reply to this message

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