POV-Ray : Newsgroups : povray.newusers : Ignorance rules! : Re: Ignorance rules! Server Time
4 Dec 2023 18:47:47 EST (-0500)
  Re: Ignorance rules!  
From: jr
Date: 23 Jun 2020 04:45:00
Message: <web.5ef1c085ea0d75ea4d00143e0@news.povray.org>

Cousin Ricky <ric### [at] yahoocom> wrote:
> Warning: non-newbies will face palm.  Three times.


> ...  One just has to keep in mind POV-Ray's scope leakage
> problems[2] when choosing names:
> ...
>    - Once *any* identifier is declared, it cannot be reused as a macro
>      name.

maybe I misunderstand.  the following works on alpha.10064268.unofficial

#version 3.8;

global_settings {assumed_gamma 1}

#declare A = 0;

#undef A

#macro A(b_)

#declare B = A(1);

#debug concat("B = ",str(B,0,0),"\n")

(if you remove the '#undef', ie try to create macro with same name while the
identifier still _is_in_use_, error "expected undeclared identifier" occurs.
which is as it should be, aiui)

regards, jr.

Post a reply to this message

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