|
From: Ethan M. <merritt@u.washington.edu> - 2008-12-08 19:03:56
|
On Wednesday 03 December 2008 09:28:18 Ralf Juengling wrote: > > Having looked at the code, I think currently it would be easier to > > store a single string for later interpretation than it would be to > > store a variable number of separate dimensions. But I'm proposing > > to throw out the current code anyhow, so that argument doesn't have > > much weight. > > I have a slight preference for not making it a string. On a second > thought a comma might not be such a good choice for separator, though. > The comma is also used to separate different lines in a single plot > command, so there is potential for ambiguity. > > I vote for ':' instead, like > > array=4:23:100 > > but not > > array=[4:23:100] > > as you initially suggested. > > Ralf > Please have a look at the patch now attached to Bug #2378535 https://sourceforge.net/tracker/index.php?func=detail&aid=2378535&group_id=2055&atid=102055 The best I have come up with is to replace array=5x10 with array=(5,10) That cleans up the parsing, and also allows you to use variables and expressions: array=(A, 2+NVAR) A bare comma with no parentheses would not work, because it makes the following plot command ambiguous: plot foo binary array=5,baz # Is baz a second dimension or a second graph? Colon is already in use to separate fields within a record, and may exist in the same specification as an array: record=(5,10):2:4 thanks for your feedback, Ethan -- Ethan A Merritt |