For loops in NMODL

NMODL and the Channel Builder.
Post Reply
Bill Connelly
Posts: 86
Joined: Thu May 22, 2008 11:54 pm
Location: Australian National University

For loops in NMODL

Post by Bill Connelly »

Do for loops exist in NMODL? Or do I have to break into a VERBATIM block? If so, is there any other conditional loop in NMODL? Are VERBATIM blocks always un-threadsafe?
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: For loops in NMODL

Post by ted »

NMODL offers two types of conditional loops: FROM loops (basically "for loops") and WHILE loops. Examples:

Code: Select all

FROM <index> = <expression> TO <expression> [BY <positive increment>]
{
<statement list>
}

WHILE [<unary_logical_operator>] <expression>
        [<binary_logical_operator> <expression>]
{
<statement list>
}
Post Reply