nest / nestml

A domain specific language for neuron and synapse models in spiking neural network simulation
GNU General Public License v2.0
45 stars 46 forks source link

Error indexing a vector with a local variable #1003

Open pnbabu opened 6 months ago

pnbabu commented 6 months ago

Indexing a vector with an uninitialized local variable in the update block results in an error. For example,

update:
    j integer
    for j in 0 ... n step 1:
        x[j] = 99.0               ## doesn't work

In this case, although the variable j is not initialized, the vector indexing should work as j should get the values from the loop. The documentation on the semantics of a local variable needs to be updated as well.

med-ayssar commented 1 month ago

Hey @pnbabu, I just tested this behaviour (current master) and got no errors.