POV-Ray : Newsgroups : povray.general : #local access : Re: #local access Server Time
8 Aug 2024 04:05:00 EDT (-0400)
  Re: #local access  
From: Chris Huff
Date: 2 Mar 2001 07:55:56
Message: <chrishuff-923E21.07541602032001@news.povray.org>
In article <3a9edf2f@news.povray.org>, "Rune" <run### [at] inamecom> 
wrote:

> > 4.) When ASSIGNING A VALUE TO AN EXISTING identifier using #declare,
> > it assigns it to the most recent, most local version at the time.
> 
> I didn't know that! That's great! It solves my problems! Thanks!

This does not seem right...#declare should always create a global 
variable. It is certainly unintuitive...to me at least.
I have suggested something before that would solve this, and it's 
partially implemented in a patch (and included in the most recent 
version of MegaPOV): the #set directive, which will assign to the most 
local version of a variable, but will not create a new identifier. You 
would use #declare and #local to *create* global and local variables, 
and #set to modify them.
This seems like a cleaner and less confusing system...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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