POV-Ray : Newsgroups : povray.newusers : declaring variables and float operations : Re: declaring variables and float operations Server Time
5 Nov 2024 09:21:39 EST (-0500)
  Re: declaring variables and float operations  
From: DeathMacabre
Date: 19 Feb 2000 11:32:02
Message: <38AEC583.4BEBED05@fcmail.com>
checked case and there's nothing wrong with it, but here's the rest of the
code
#declare RCon = 2.3;
#declare XPos = 0.0;
#declare ZPos = RCon-XPos;
while (XPos <= RCon)
  sphere {< XPos,0, ZPos>,.1}
  sphere {< XPos,0,-ZPos>,.1}
  sphere {<-XPos,0,-ZPos>,.1}
  sphere {<-XPos,0, ZPos>,.1}
  #declare XPos = XPos+.1;
  #declare ZPos = RCon-XPos;
#end//while

DeathMacabre wrote:

> after reading the pov ray help file i am left with a question
> why does the following line not work?
> #declare ZPos = RCon-XPos;
> before this line the variables RCon and XPos are declared and set to 2.3
> and 0 respectively
> however, it returns an error saying that an object or directive was
> expected but a while (the beginning of the next line) was found instead


Post a reply to this message

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