From: Dave D. <dde...@es...> - 2004-07-21 10:38:27
|
Ethan A Merritt <merritt@u.washington.edu> writes: > On Sunday 18 July 2004 07:03 am, Hans-Bernhard Broeker wrote: >> > 3) user-defined string-valued functions. >> >> Users will almost certainly want to be able to do something like this: >> >> filename(i)=sprintf("foobar%d.ps", i) >> >> i=15 >> > But that example does not require a user-defined function. > That is the behaviour you would get anyway, courtesy of > the automagic string evaluation code already written. > > filename = 'sprintf("foobar%d.ps",i)' Sorry, I'm keeping up with this topic... This may be a stupid question, but does this syntax extend to arbitrary expressions, or just variable names ? filename = 'sprintf("foobar%d.ps", i+1)' or maptofilename(i)=i+1 filename = 'sprintf("foobar%d.ps", maptofilename(i))' dd -- Dave Denholm <dde...@es...> http://www.esmertec.com |