POV-Ray : Newsgroups : povray.general : Did you know? : Re: Did you know? Server Time
2 Oct 2025 23:45:19 EDT (-0400)
  Re: Did you know?  
From: Leroy
Date: 26 Sep 2025 17:50:00
Message: <web.68d708b1593097ed823d762af712fc00@news.povray.org>
"Leroy" <whe### [at] gmailcom> wrote:
> Variables can act as any type

I guess I didn't learn all the tricks of POV. When I first came to POV it was
from Qbasic and thought that a float is a float is a float, not a string or
anything else. I carried that on for more than 20 years.
 The only reason I found out was because of You Tube with it topics of the worst
and best programing styles. While playing with macros, trying to make my POV
files hard to read or easier to write in win3.7. Macros need to have the
variable define before using it as an input there. So I wrote a macro to declare
a variable and its type with a string. It worked great. I set it up so that you
could declare an unlimited number of variables with a single string(with one
line of code). Cool!
 I had replace #declare with macro Set(A,B) [#local A=B]. While testing things
out I accidently had A & B different types. That was IT.

 If everyone knew this why haven't we have a contest to write code creating the
most complicated scene with the fewest variables used?
I guess it would end a tie with 2 or 3 variables.

Have fun!


Post a reply to this message

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