|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The little test fails on the first line of the second dict with a parse
error ) expected , found.
If reported before, sorry, havn't followed along for a few years.
If not a bug, please see it as a feature request ;)
#declare fig = dictionary {
["head"] : <0, 0, 0>,
["nose"] : <1, 0, 0>,
["atlas"] : <0,-1, 0>,
["tail"] : <0,-3, 0>
}
#declare bone = dictionary {
["face"] : (fig["head"], fig["nose"]),
["neck"] : (fig["head"], fig["atlas"]),
["spine"] : (fig["atlas"], fig["tail"])
}
3.8.0-alpha.9893777+av622.msvc14.win64
Win10
ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Probably completely misread the docs on the previous one.
The following parses forever:
#declare fig = dictionary {
["head"] : <0, 0, 0>,
["nose"] : <1, 0, 0>,
["atlas"] : <0,-1, 0>,
["tail"] : <0,-3, 0>
}
#declare bone = dictionary {
["face"] : array{fig["head"], fig["nose"]},
["neck"] : array{fig["head"], fig["atlas"]},
["spine"] : array{fig["atlas"], fig["tail"]}
}
ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
ingo <ing### [at] tagpovrayorg> wrote:
> The following parses forever:
>
> #declare fig = dictionary {
> ["head"] : <0, 0, 0>,
> ["nose"] : <1, 0, 0>,
> ["atlas"] : <0,-1, 0>,
> ["tail"] : <0,-3, 0>
> }
>
>
> #declare bone = dictionary {
> ["face"] : array{fig["head"], fig["nose"]},
> ["neck"] : array{fig["head"], fig["atlas"]},
> ["spine"] : array{fig["atlas"], fig["tail"]}
> }
>
> ingo
same for the *nix version. does not terminate on ^C then, needed 'kill -s hup'.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
ingo <ing### [at] tagpovrayorg> wrote:
> The following parses forever:
>
> #declare fig = dictionary {
> ["head"] : <0, 0, 0>,
> ["nose"] : <1, 0, 0>,
> ["atlas"] : <0,-1, 0>,
> ["tail"] : <0,-3, 0>
> }
>
>
> #declare bone = dictionary {
> ["face"] : array{fig["head"], fig["nose"]},
> ["neck"] : array{fig["head"], fig["atlas"]},
> ["spine"] : array{fig["atlas"], fig["tail"]}
> }
>
> ingo
if you write:
#declare bone = dictionary {
["face"] : array [2] {fig["head"], fig["nose"]},
["neck"] : array [2] {fig["head"], fig["atlas"]},
["spine"] : array [2] {fig["atlas"], fig["tail"]}
}
it'll work.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in news:web.5bfd56506924cc99783c249c0@news.povray.org jr wrote:
> if you write:
> [...]
Thanks. Thats what I started with, but read somewhere the [2] can be
omitted for one dimensional arrays,
ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
ingo <ing### [at] tagpovrayorg> wrote:
> in news:web.5bfd56506924cc99783c249c0@news.povray.org jr wrote:
>
> > if you write:
> > [...]
>
> Thanks. Thats what I started with, but read somewhere the [2] can be
> omitted for one dimensional arrays,
yes, a new feature. I think though that such arrays cannot be initialised where
they're declared (clipka?).
fwiw, I used such arrays in 'queues.inc', have a look (posted in
text.scene-files, on Nov 6th).
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 25.11.2018 um 17:13 schrieb ingo:
> Probably completely misread the docs on the previous one.
Indeed. Tuples are not a thing in POV-Ray. There is only a tuple-ish
syntax to assign multiple variables at the same time.
> The following parses forever:
That's pretty much the worst of all outcomes. Guess I'll have to look
into this.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 27.11.2018 um 15:36 schrieb jr:
> if you write:
>
> #declare bone = dictionary {
> ["face"] : array [2] {fig["head"], fig["nose"]},
> ["neck"] : array [2] {fig["head"], fig["atlas"]},
> ["spine"] : array [2] {fig["atlas"], fig["tail"]}
> }
>
> it'll work.
Thanks for that find. It'll help narrow down the issue more quickly.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 27.11.2018 um 23:27 schrieb ingo:
> in news:web.5bfd56506924cc99783c249c0@news.povray.org jr wrote:
>
>> if you write:
>> [...]
>
> Thanks. Thats what I started with, but read somewhere the [2] can be
> omitted for one dimensional arrays,
Note that this isn't just a matter of convenience - the resulting arrays
will behave differently, with the "non-sized" array being able to grow
dynamically. The downside of such dynamically-sized arrays is that they
require more memory.
So whenever you know the size of the array in advance, omitting it is
bad practice.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Apparently the dynamically-sized array doesn't like to have an initializer.
So this also enters an infinite loop:
#declare Foo = array { 42, 4711 };
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|