On Wed, Jun 17, 2009 at 04:55, Philip Ganchev<[email protected]> wrote: ... > You can do these like this: >> set var a b >> echo $var > a b >> echo $var[1] > a >> function foo > echo -e "A\nB\nC" > end >> set var (foo) >> echo $var > A B C ... > An array of arrays can be created and accessed like this: > >> set a b c >> set b 1 2 >> set c 3 4 >> echo $$a[2] > 3 4 >> echo $$a[2][1] > 4 > > Regards, > Philip
What Philip said. Just make sure your strings don't contain any newlines when you want to 'return' them from a function. Also, fish doesn't actually do multidimensional arrays, it just has arrays of strings. You can fake multidimensional arrays the way Philip showed by putting the \names\ of the subarrays in an array. Jan ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
