HOC template with `public morphology`.
Closed this issue · 1 comments
Consider the following HOC template found in the channel benchmark (interesting parts only):
begintemplate CA1_int_bAC_011017HP2_2018011015390
public morphology
endtemplate CA1_int_bAC_011017HP2_2018011015390
As far as we (@alkino and me) can tell the following two statements are true:
- There exists a HOC symbol called
"morphology"
which is used to refer to the morphology. - This template creates a different symbol called
morphology
.
Why do we notice? When generating code with NOCMODL, it does hoc_lookup("morphology")
during registration and saves the symbol in a static variable. In NMODL, we do the hoc_lookup("morphology")
when allocating the property. When using the above HOC template the NMODL generated code will pick up the wrong symbol, i.e. the one created by the template.
Question: Are HOC templates permitted to have a public morphology
?
This is fine. It's likely a scoping issue that could be circumvented using hoc_table_lookup
cause a lookup in the appropriate symbol table.