Jeroen Demeyer on Sun, 18 Feb 2007 11:19:50 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Embedded Braces


Justin C. Walker wrote:

On Feb 17, 2007, at 11:17 , Artin Farahani wrote:

gp tells me that:

 ***   sorry, embedded braces (in parser) is not yet implemented.

Then, how can I have a multi-line command in a function in a script?
**** example.gp ****
func(n) = {
   for(i=1,n, {
      line1;
      line2;
      etc;
      });
}

You don't need the braces (just remove them).
Remove the inner braces, but keep the outer.