POV-Ray : Newsgroups : povray.beta-test : POV-Ray v3.8.0-alpha.9850723 Server Time
22 Dec 2024 04:23:29 EST (-0500)
  POV-Ray v3.8.0-alpha.9850723 (Message 1 to 1 of 1)  
From: clipka
Subject: POV-Ray v3.8.0-alpha.9850723
Date: 23 Sep 2018 16:25:54
Message: <5ba7f6d2$1@news.povray.org>
I though you might like to try out the mixed-type arrays I had promised
almost two years ago that strangely enough nobody seems to have ever tested:

https://github.com/POV-Ray/povray/releases/tag/v3.8.0-alpha.9850723

Declaring an array with the `mixed` keyword, like so:

    #declare Foo = array mixed[42];

will allow to store elements of different types in the array, like so:

    #declare Foo[0] = 42;
    #declare Foo[1] = "Fnord";
    #declare Foo[2] = sphere { <0,0,0>, 1 }


The `mixed` keyword can also be used on dynamically-sized arrays, like so:

    #declare Foo = array mixed;

It can also be combined with array initializers as one would expect.


There you go - have fun TESTING this ;)


Post a reply to this message

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