The problem was caused by a non-ASCII character embedded in the hoc file that blop
was testing.
od -a test.hoc produced this output:
Code: Select all
0000000 ht o b j r e f sp p r e , sp n c sp
. . .
0000060 e sp = sp 1 B sp sp / / sp f o r sp n
where the B in line 060 was suspicious, and od -x test.hoc confirmed this suspicion
(the carets ^ just below the bad hex code were added by me):
Code: Select all
0000060 2065 203d c231 20a0 2f2f 6620 726f 6e20
^^
0xc2 (hexadecimal) = 194 (decimal), i.e. lies outside the ASCII character set, which stops at
0x7f (127 decimal).
It's not clear how it got there, and it's also a bit puzzling that it wasn't in the code that blop
posted above. But it certainly was in the hoc file that blop sent me, which was produced
with TextWrangler.
So the take-home lesson is how to diagnose and fix such problems on the rare occasions
when they occur.
The question mark in the error msg on blop's Mac is in exactly the same place as the
non-ASCII character in the hoc file. Under Linux, the error message is
Code: Select all
/usr/local/nrn/i686/bin/nrniv: syntax error
in test.hoc near line 3
pre.noise = 1 // for negexp ISIs
^
i.e. not so nice because the exact location of the bad character isn't flagged. But in
either case, the fix is the same: get rid of the bad character. The quick and dirty way
is just to delete the entire line (or just the bad character if you can identify it) and retype it.