For loops in NMODL
-
- Posts: 86
- Joined: Thu May 22, 2008 11:54 pm
- Location: Australian National University
For loops in NMODL
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?
-
- Site Admin
- Posts: 6305
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: For loops in NMODL
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>
}