POV-Ray : Newsgroups : povray.unofficial.patches : MegaPov : Re: MegaPov Bugs Server Time
2 Sep 2024 22:21:22 EDT (-0400)
  Re: MegaPov Bugs  
From: smellenbergh
Date: 10 Dec 1999 15:35:03
Message: <1e2m8dk.1s9za3q8kervsN%smellenbergh@skynet.be>
Ken <tyl### [at] pacbellnet> wrote:

> 
>   All of the following are syntax bugs found in the example scenes.
> I suspect there is a naming collision with a reserved function name
> i.e. image_height and image_width. Changing to image_h and image_w
> allows the scenes to render as expected.
> 
> //    Persistence of Vision Ray Tracer Scene Description File
> //    File: double_illuminate.pov
> //    Date: 15/11/99
> //    Demo double_illuminate
>   
> This does not work
> 
> camera {
>   location < 0.0, 5, -2.5 >
> #declare image_height = 240;
> #declare image_width =  320;
>   up image_height*y
>   right image_width*x
>   angle 35
>   look_at < 0.0, 0.0, 0.0 >
> }
> 
> This does work
> 
> camera {
>   location < 0.0, 5, -2.5 >
> #declare image_h = 240;
> #declare image_w =  320;
>   up image_h*y
>   right image_w*x
>   angle 35
>   look_at < 0.0, 0.0, 0.0 >
> }
> 

Yes, image_height and image_width are reserved keywords now.
They 'read' the image size entered in the options.

If you want to set (write) your own image_size, use the  keyword
ini_option "..."
or #declare Image_height and Image_width, using a capital letter in the
identifier.
I would like to emphasize the importance of using at least one Capital
letter in identifiers. Reserved keywords will always use only small
letters, therefore there will be no conflict with identifiers having a
capital letter. Not now and not in the future when new keywords will be
added!
The same goes for declared variables in macros. Please make it a habit
for future identifiers.

Smellenbergh


-- 
e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

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