Forum Discussion
Syntax error in initial block
- 3 years ago
Thanks a lot. That is indeed the problem. I have no idea how that back tick crept in as I do not have it on my keyboard. Perhaps I copied it from somewhere though I cannot remember.
Ok, I think I found the problem.
I copied your code via cut/paste and it barfs when I compile.
It appears in your constants in the initial block you used a unicode apostrophe character instead of a single ascii apostrophe (').
At least that is what I got when I did a cut/paste of your code verbatim.
Once I went in and edited the constants to use a single ascii apostrophe (ie, like 4'b0) it compiled Ok.
foo.c is your code. The apostrophe character in the constants is '342 200 231' instead of the single ascii apostrophe (') in the edited code bar.c.
par[533] od -c foo.v 0000000 i n i t i a l b e g i n \r \n d 0000020 i v = 4 342 200 231 b 0 ; \r \n l p 0000040 c = 4 342 200 231 b 0 ; \r \n p a 0000060 = 4 342 200 231 b 0 ; \r \n p l c _ l 0000100 s b = 8 342 200 231 b 0 ; \r \n p l 0000120 c _ u s b = 8 342 200 231 b 0 ; \r 0000140 \n d s b = 9 342 200 231 b 0 ; \r \n 0000160 e n d \r \n 0000165 par[536] par[536] od -c bar.v 0000000 i n i t i a l b e g i n \r \n d 0000020 i v = 4 ' b 0 ; \r \n l p c 0000040 = 4 ' b 0 ; \r \n p a = 4 ' 0000060 b 0 ; \r \n p l c _ l s b = 8 0000100 ' b 0 ; \r \n p l c _ u s b = 0000120 8 ' b 0 ; \r \n d s b = 9 ' b 0000140 0 ; \r \n e n d \r \n
- KarelSterckx3 years ago
Occasional Contributor
Thanks a lot. That is indeed the problem. I have no idea how that back tick crept in as I do not have it on my keyboard. Perhaps I copied it from somewhere though I cannot remember.