POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest v4.0 read only identifiers. (yuqk R15 v0.6.9.0) : Re: Suggest v4.0 read only identifiers. (yuqk R15 v0.6.9.0) Server Time
27 Jul 2024 12:25:51 EDT (-0400)
  Re: Suggest v4.0 read only identifiers. (yuqk R15 v0.6.9.0)  
From: Bald Eagle
Date: 27 Jun 2024 19:25:00
Message: <web.667df4b64bc5dc751f9dae3025979125@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2024-06-27 11:44 (-4), William F Pokorny wrote:
> > Release R15 of the yuqk fork has an implementation supporting constant
> > identifiers / macro parameters. They are indicated by using a leading
> > '_' character in the name.
>
> I also agree with Ingo: a keyword or directive would be better, such as:
>
>   #const MagicNumber = 12345;
>
> I'm thinking a keyword modifier would be more flexible than a directive,
> for example:
>
>   #declare const GlobalVal = 12345;
>   #local const LocalVal = 54321;

Hmmm.   Yes, but maybe no?
Why not just have another separate type of declaration?

#declare
#local
#constant

We've also discussed
#persistent

as well as PRAGMA

So maybe #constant can ONLY be changed by specifically using another #constant
directive.

I dunno - I'm not really a computer language person, but the pro's and cons of
each approach ought to be hashed out with an eye towards Pov-Ray 4.0

- BW


Post a reply to this message

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