Saturday 15 February 2014

2D array in Postscript -


How is 2D array created in postscript?

I am thinking that I need an array where every element is an array, in this case the array is called the shape.

  / shape 2 array def / shape_length 3 def shape 0 2 array shaped 1 2 array inserted size 2 2 array% [empty, empty, empty], [empty, zero , Blank], [empty, empty, empty]]   

I can make a loop instead of copying a line 3 times like this.

I can not have the size length.

Is there a good way to go about doing this or is there something more compact?

Such a structure can be constructed very briefly: < Using GotScript interactive, you can see that this is actually the result in the desired array:

 [3 {3 array 3} repeat]   

> GS & gt; [3 {3 array} repeat] == ​​[[null empty null] [null empty null] [null blank null]]

No comments:

Post a Comment