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

Pasting Formed an Invalid Preprocessing Token Error

I haven't a clue what the error in this means or how to fix it. Your help is appreciated. Thank you.

Parents Reply Children
  • Yes but not originally for some reason, as I alluded to in my last update. I did install that patch, but continued to have problems, perhaps because I did not use the default installation locations. Things just got so messy that I started all over again and reinstalled my Keil, both 4.xx and 5.xx, using the defaults. Since so much of the code I was using had been written on earlier editions, I have decided to revert back to using 4.xx. i am now looking at these preprocessor tokens to try and better understand what these errors mean and what I need to do to get rid of them. I'm not even sure this code will build in 4.xx on account of the ##. Thanks.

  • Someone smarter than I could probably get rid of the ##. The task probably requires a FIFO Queue for the scanning output and a wise person could probably show you a way to make one with that macro sans ##.

  • Yes I agree,,, a FIFO does make sense here to buffer the key presses until done, but I haven't seen one before with those token thingys either. These error codes too,,,, If I drop a semicolon from the end of a line, I fully expect to see "Discombobulation error eleventy-two on hyper fradistat, bashed bindelwarfer" Instead of, you know... "Line not terminated with a semicolon". I seem to be mumbling the question "Why ?" instead of what, how or where when using software, most of the time , as in "Why did they do that ?".

  • Someone smarter than I could probably get rid of the ##

    That would actually be quite simple:

    • Replace two individual variables by a struct with fields "PutI and GetI"
    • Replace all occurences of '## ++' by just '++'.
    • Replace all remaining occurences of '##' by '.'