POV-Ray : Newsgroups : povray.general : reading uv vectors from file : Re: reading uv vectors from file Server Time
29 Jul 2024 06:24:41 EDT (-0400)
  Re: reading uv vectors from file  
From: Le Forgeron
Date: 13 Dec 2012 12:51:11
Message: <50ca158f@news.povray.org>
Le 13/12/2012 10:34, Thomas de Groot nous fit lire :
> I have a problem.

> #fopen Triangles1 "MyFile.inc" read
> #while (defined(Triangles1))
>   #read (Triangles1, T1, T2, T3, T4, T5, T6, UV1, UV2, UV3)
>   etc...
> #end
> 
> I get immediately a parse error at the end of the first line saying:
> "Parse error: Expected 'undeclared identifier', uv vector identifier
> found instead"
> 
> How should I then declare the 2D vectors in order to be read correctly?
> 

If I read the error message, I would conclude that at the start of the
*second* iteration, UV1 & pal are still defined

Try something like:

#fopen Triangles1 "MyFile.inc" read
#while (defined(Triangles1))
  #read (Triangles1, T1, T2, T3, T4, T5, T6, UV1, UV2, UV3)
  etc...
  #undef UV1
  #undef UV2
  #undef UV3
#undef T1
#undef T2
#undef T3
#undef T4
#undef T5
#undef T6
#end


> Thanks!
> 
> Thomas


Post a reply to this message

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