|
From: <pl...@pi...> - 2012-01-21 10:34:01
|
On 01/20/12 21:15, Ethan Merritt wrote: > On Friday, 20 January 2012, pl...@pi... wrote: >> On 01/20/12 20:29, Ethan Merritt wrote: >>> I gave two examples where this is (I think) the correct thing >>> to do, but I can easily imagine that there are other cases where >>> it is not necessarily the best thing to do. Perhaps being >>> inside an iteration loop is one of these cases. >> >> The two examples you gave make sense. this has been the case previously >> and works well. >> >> The iteration loop would probably create equally unexpected results if >> it started doing full evaluation. All I was suggesting is that the >> substitutions that are made by iteration are also applied to the title >> >> plot "datafile1", "datafile2" , "datafile3" >> >> creates a legend >> >> datafile1 ------- >> datafile2 ------- >> datafile3 ------- >> >> I am suggesting that >> >> plot for [i in "1 2 3"] "datefile".i >> >> does the same instead of: >> >> "datefile".i ------ >> "datefile".i ------ >> "datefile".i ------ > > But how do you suggest that the program would do this partial > evaluation? There is no mechanism for saying "evaluate this > expression only to the extent of terms that involve a particular > variable". > > I understand the issue you are raising, but I still don't think > it has anything in particular to do with iteration. > If you say (no iteration) > i = 3 > plot "datafile.".i > then the autogenerated title is not 'datafile.3', > it is '"datafile.".i'. > > That's probably not what you want, but how is the program to > guess this? In the equally plausible case > File(x) = "datafile.".x > plot File(3) > then the autogenerated title "File(3)" _is_ what you probably want. > So in one case you want evaluation but in the other case you do not. > How can the program distinguish the two cases automatically? > > Ethan > I don't intend to participate in another interminable discussion. I have raised the issue, if you don't wish to fix it or regard it as a "feature", fine. It's not preventing me from working or enjoying life. I just posted another instance where iteration error reports are unhelpful. I think as more people use this new feature other aspects of the problem will arise and maybe it will be seen as useful to see whether iteration requires special treatment. Until then, I'm off to get on with plotting. Peter. |