hi everyone i am trying to right a debug funtion SIGNAL as
SIGNAL void function (void) { PORT0 = ~ PORT0; twatch(1000); }
But when i compile it it gives error
****error 6;line 10; syntex error
can anyone figure it out
well, evidently your actual code has 10 or more lines, but the snippet you show do not. How is anyone going to relate the error message to line 10 when you only show 5 lines
As Erik points out, you should show all ten lines or we are just guessing. So my guess is that you failed to include a CR after the last brace in your signal code. The CR is the line delimiter. Also, a signal is normally a repeating loop which we cannot see in your code. Bradford
WELL Thanks YES the problem was that of CR.. It is not mentioned in the help file to write Cr after the closing funtion braces ..Is it always necessery to write it after closing function,other then SIGNAL fuction ,in debug funtions...
I would really recommend that Keil fixes this.
No modern tool should treat newline as a line terminator. It is far better with tools that treats the newline as a line separator, i.e. processes the last line even if it doesn't end with a cr, lf, cr+lf, lf+cr or whatever the local newline sequence happens to be.
Per; I can agree with your statements but it has been implemented this way in uVision since heck was a pup so I doubt that Keil will change. It is described as a requirement in the debugger manual. Bradford
Is it always necessery to write it after closing function,other then SIGNAL fuction ,in debug funtions... I failed to fully answer your post. I'm sorry that I did not read more closely. It is required for all entries in the Debugger editor. I believe it grew out of the fact that in the past, these test functions where entered from the Debugger command line and to get any entry at the command line required a CR. This was carried over into the Debugger editor about the time that uVision2 became uVision3. The normal delimiter in the limited debugger editor is the LF/CR or rather the CR. In typing you would normally use the CR but when you cut and paste you lose the last CR. I'm aware of this problem since I step into this crack about every time I use the Debugger editor.
View all questions in Keil forum