Open 1uc opened 1 month ago
In nocmodl the string factorial is reserved for the function factorial and will refuse to compile. In NMODL, it seems to generate a user-specified and it doesn't not error out.
nocmodl
factorial
Valid:
NEURON { SUFFIX recursion } FUNCTION myfactorial(n) { myfactorial = factorial(n) }
Invalid:
NEURON { SUFFIX recursion } FUNCTION factorial(n) { if (n == 0 || n == 1) { factorial = 1 } else { factorial = n * factorial(n - 1) } }
Yes. factorial is listed in nrn/src/nmodl/extedf.h as a supported function (from the scoop-math library)
In
nocmodl
the stringfactorial
is reserved for the function factorial and will refuse to compile. In NMODL, it seems to generate a user-specified and it doesn't not error out.Valid:
Invalid: