POV-Ray : Newsgroups : povray.beta-test : [doc] concat with one parameter : Re: [doc] concat with one parameter Server Time
29 Jul 2024 16:33:05 EDT (-0400)
  Re: [doc] concat with one parameter  
From:
Date: 27 May 2002 04:10:53
Message: <66q3fucd0jm23dsdfi0jgi30qn3cto0cmq@4ax.com>
On Mon, 27 May 2002 09:00:37 +0200, Mark Weyer
<wey### [at] fregemathematikuni-freiburgde> wrote:
> I agree this is a useful feature, although for different reasons.
> Consider the following macro:
> #macro reverse_string (s)

#macro reverse_string (s)
  #if(strlen(s)>1)
    concat(
      #local j=strlen(s);
      #while (j)
        substr(s,j,1)
        #local j=j-1;
      #end
    )
  #else
    s
  #end
#end

ABX


Post a reply to this message

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