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
8 Oct 2024 11:53:54 EDT (-0400)
  Re: Suggest v4.0 read only identifiers. (yuqk R15 v0.6.9.0)  
From: Bald Eagle
Date: 27 Jun 2024 12:05:00
Message: <web.667d8d8f4bc5dc757b170db125979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> 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.
>
> Aside: I have hopes this mechanism a step toward enabling the safe
> passing of function pointers into yuqk's inbuilt functions.
>
> Attached a first pass at a little documentation for the feature.
>
> Bill P.

Very nice - I hope that works out the way you/we/everyone would like.

"Parse Error:
Attempt to #undef a constant identifier.
The identifier is:
    '_V99'
Due the leading '_' the existing identifier can only be read.
Fatal error in parser: Cannot parse input."

Is that a scene-wide global thing?
Due to some need to actually undefine or redefine a variable, maybe the leading
underscore could be a safeguard, rather than a complete lockout.

Maybe have some mechanism by which you can do the equivalent of su in a shell to
override the protections set in place to prevent casual/inadvertent overwriting.

Only saying this because it might make some things pretty awkward to code from
scratch / covert from legacy scenes into yuqk.

I dunno - maybe doing scene development you might want to have the safeguard in
place for the main scene, but during experimentation you want to turn off the
protection, but not scene-wide, only in the little test block of code that
you're fiddling with.

Just a thought.


Post a reply to this message

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