Open rebolbot opened 15 years ago
Submitted by: Carl
Unless some other argument can be made, it looks like it needs to be the same as IMAGE! serial format: no extra block.
>> mold make vector! 3
== "make vector! [integer! 32 3 [^/0 0 0^/]]"
>> mold next make vector! 3
== "make vector! [integer! 32 2 [^/0 0^/]]"
>> mold/all next make vector! 3
== "#[vector! integer! 32 3 [^/0 0 0^/] 2]"
Submitted by: BrianH
I'm OK with no extra block, as long as multiple indexes could be specified in theory. Multiple index integers could do it, and the multiple dimensions of a multi-dimensional vector could be formatted as nested blocks, similar to what is returned by ARRAY.
Like this:
>> #[vector! integer! 32 3 2 [[0 0 0] [0 0 0]] 2 2]
or this:
>> #[vector! integer! 32 [3 2] [[0 0 0] [0 0 0]] 2 2]
or this:
>> #[vector! integer! 32 [3 2] [[0 0 0] [0 0 0]] [2 2]]
Not sure which I prefer. The latter two would be easier to compose in the MAKE spec form with COMPOSE/only:
>> make vector! [integer! 32 [3 2] [[0 0 0] [0 0 0]]]
== make vector! [integer! 32 [3 2] [
[0 0 0] [0 0 0]
]]
>> make vector! [integer! 32 [3 2] [0 0 0 0 0 0]]
== make vector! [integer! 32 [3 2] [
[0 0 0] [0 0 0]
]]
>> make vector! compose/only [integer! 32 (dimensions) (data)]
Submitted by: Carl
I'm going to conclude this specific bug (image! vs vector!). The issue of dims needs discussion separately.
Submitted by: BrianH
Note: The vector! syntax was changed to the no-extra-block style.
Submitted by: Carl
MOLD/all of image! contains no inner blocks, but of vector! there appears to be an extra. Which should be the standard?!
This problem manifests itself in this issue: pick the correct form for a serialized indexed vector:
Also, keep in mind that vectors in 3.1 can be multi-dimensional, which means they may have a number of value init blocks.
CC - Data [ Version: alpha 65 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:alpha 66 ]