POV-Ray : Newsgroups : povray.programming : Object oriented POV scene language? : Re: Object oriented POV scene language? Server Time
28 Jul 2024 16:15:57 EDT (-0400)
  Re: Object oriented POV scene language?  
From: Warp
Date: 25 Jul 2000 08:48:56
Message: <397d8cb8@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
: #define T1 A
: #define T2 B
: #define TEMPLATE_swap swap_AB
: #include "mytmpl.h"
: #undef T1
: #undef T2

  What is shorter, to write the 6 lines of code above for every pair of
structs you use, or just write the swap function directly?

  Perhaps in this case it could be better to have a 'swap' method inside
the classes/structs, so you could write:

  a.swap(b);

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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