Gen function declaration


    Apr 24 2014 | 10:29 am
    Hi,
    I would like to ask a question to people who are familiar with gen. I'm trying to implement a factorial function like this:
    factorial(N) { if (N return 1; } result=2; for (i=3; i result=(i+alpha+1)*i; } return result; }
    However I get the "statement missing ;" in a first line.
    Can you point me out whats wrong with this function. This example is from JavaScript book.
    The Max version I use is 6.1.7 32 Bit on Windows 7.

    • Apr 24 2014 | 2:28 pm
      Gen~ doesn't have a ++ operator. You have to use something like i += 1.
    • Apr 25 2014 | 5:27 am
      Thank you Emmanuel, I will look into this.