POV-Ray : Newsgroups : povray.beta-test : [doc] concat with one parameter : Re: [doc] concat with one parameter Server Time
29 Jul 2024 10:28:54 EDT (-0400)
  Re: [doc] concat with one parameter  
From: Felix Wiemann
Date: 22 May 2002 09:46:44
Message: <3ceba144@news.povray.org>
Warp wrote:
> Felix Wiemann wrote:
>> Where's the problem with concat?
> 
>   Have you tried just enclosing the string in parentheses?

What do you mean? Enclose the variable name in parentheses? That of course 
won't work. Note that the string itself is normally not available before 
parsing so it's necessary to use a variable.

>> Is much longer. So not better but worse.
> 
>   Perhaps you should learn some basics of (modular) programming.
>   "It's much longer" is a really poor excuse for making bad code.

Hmmm... The SDL is actually not very modularized. It's more a description 
language than a programming language. Macros and functions are possible but 
structures or even classes aren't supported. When I want to write a program 
for POV-Ray, I write a C++ program which generates SDL code.

>   You have to write one #local more - so what? The alternative is to write
> an extra 'concat()' several times, which makes the code quite obfuscated
> and longer.

OK, normally it's better to write well understandable code, but I'm 
currently working on my signature, so in this case it's very important to 
save even a few bytes.
And IMHO it's not a problem to understand what concat with one parameter 
does.
-- 
Felix Wiemann


Post a reply to this message

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