This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debug Editor in uV3 won't compile

I have defined a function in the Function editor, saved it, then tried to compile, and I get a compile error:

FUNC void FooBar (void) {
printf("foobar");
}
^
*** error 10, line 3: Syntax error
*** Function creation aborted due to syntax errors

But if I remove all CR's, it seems to compile fine:
FUNC void FooBar (void) { printf("foobar"); }

Is this a bug? Is there somewhere else I should report this if it is?

Parents Reply Children
  • Nik;
    The problem is no line fed-carriage return after the last line of code.
    This simple editor looks for LF/CR as the end of line delimiter.
    While it looks like C code, it really is a script file that is interpreted after each line just as if you typed the line in the command line. So, you must end each line with CR/LF.
    You cannot have line continuation as in the C language.