nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

PARAMETER can't be assigned during INITIAL.

Open 1uc opened this issue 1 year ago • 0 comments

The following MOD file is legal in NOCMODL:

NEURON {
    SUFFIX initialize
}

PARAMETER {
    p
}

INITIAL {
    p = 42.0
}

The parameter is converted from a static double to a "thread variable". In NMODL it fails to compile with:

[NMODL] [error] :: Code incompatibility detected
[NMODL] [error] :: Cannot translate mod file to .cpp file
[NMODL] [error] :: Fix the following errors and try again
[NMODL] [error] :: Code Incompatibility :: "p" variable found at [UNKNOWN] should be writable if it needs to be written

1uc avatar Aug 21 '24 07:08 1uc