POV-Ray : Newsgroups : povray.beta-test : I have a hunch some of you may like this... : Re: I have a hunch some of you may like this... Server Time
19 Apr 2024 03:27:27 EDT (-0400)
  Re: I have a hunch some of you may like this...  
From: clipka
Date: 17 Sep 2016 23:09:37
Message: <57de0571$1@news.povray.org>
Am 18.09.2016 um 04:14 schrieb Mike Horvath:
> On 9/17/2016 4:41 PM, clipka wrote:
>> But I /will/ say more:
>>
>>      #declare MyFrobnitz = dictionary {
>>        .Foo = 42,
>>      };
>>      #declare Key = "Bar";
>>      #declare MyFrobnitz[Key] = "FTW!";
>>
> 
> I don't like the dot before the identifier.

On a scale from 0 to 10, how much do you not like it?

Also, what alternative would you suggest for the following syntax, and
how would you avoid conflicts between the two initializer syntax variants?

    #declare MyFrobnitz = dictionary {
      "Foo" = 42,
      "Bar" = "FTW!"
    }

Bear in mind that it should be possible to replace the string literals
with arbitrary string expressions, including simple string identifiers.

Also bear in mind that the following syntax variants for individual
element access are to be considered (almost) a given:

    #declare MyFrobnitz.Foo = 42;
    #declare MyFrobnitz["Foo"] = 42;


Post a reply to this message

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