Q: I am facing a strange error with lines written as such: $
uint8_t potm potSetting;
where uint8_t is typedefed above, provides the following errors
/tmp/cc0twSga.s: 134: Error: expected comma after symbol-name
/tmp / cc0twSga.s: 134: error: unknown opcode “potsetting
If I remove the $ and everything for him, in this case $ potm, leaving only uint8_t potSetting, the error goes away. So is the $ character in the special variable names ?
Re:Since "(nonspacechar)$(nonspacechar)" would be very unlikely to occur in normal C code, something like grep or a perl script could be used to automate the fixup process to change the $ to _
Code generators can be annoying — the SOAP code generator we use gets the order of some interdependent class/structure definitions wrong, so we have to fix the resulting C++ code by hand whenever we add support for new or changed services.
Re:You have an apology.
And my comment still stands; knowing the language syntax saves a lot of grief. I would have been a little more tactful if I had known that it was generated code which did not seem to be indicated.
As others did point out, you will have to due the substitutions; probably error line by line.
A mass sub could create as many problems as it solves.
The other pain will be that any work done could be lost everytime you regenerate the file.
There probably is no way that you can get to the code generator and correct the underlying problem.
Re:Originally posted by: guy
Originally posted by: guy
Originally posted by: guy
Originally posted by: akubi
rofl….
only alphanumeric characters and underscores are allowed. must not start with a digit either
Yes – learn the proper syntax for the language that you are using. Helps a lot
Piss off. I'm working with a 4000 line C file generated from nesC code (modular). The generated code declares variables and functions with <module>$<interface>$<function name>, and I figured as much about the $ sign, but its hard to google the letter "C" to find C syntax.
This isn't counter-strike. If I ask a simple question, why be a jerk.
edit: thanks to the other people
Your best option is to replace the '$' with '_' so that you don't lose what the code generated.
You can also google "C syntax" or similar terms for quick reference guides to C.
Yeah I did that too but nothing specific came up. Unfortunately I don't have control over the generated code, or rather I'm trying to keep it as intact as possible, so I'll find a way to work around it. Thanks.
Re:Originally posted by: guy
Originally posted by: guy
Originally posted by: akubi
rofl….
only alphanumeric characters and underscores are allowed. must not start with a digit either
Yes – learn the proper syntax for the language that you are using. Helps a lot
Piss off. I'm working with a 4000 line C file generated from nesC code (modular). The generated code declares variables and functions with <module>$<interface>$<function name>, and I figured as much about the $ sign, but its hard to google the letter "C" to find C syntax.
This isn't counter-strike. If I ask a simple question, why be a jerk.
edit: thanks to the other people
Your best option is to replace the '$' with '_' so that you don't lose what the code generated.
You can also google "C syntax" or similar terms for quick reference guides to C.
Re:Originally posted by: guy
Originally posted by: akubi
rofl….
only alphanumeric characters and underscores are allowed. must not start with a digit either
Yes – learn the proper syntax for the language that you are using. Helps a lot
Piss off. I'm working with a 4000 line C file generated from nesC code (modular). The generated code declares variables and functions with <module>$<interface>$<function name>, and I figured as much about the $ sign, but its hard to google the letter "C" to find C syntax.
This isn't counter-strike. If I ask a simple question, why be a jerk.
edit: thanks to the other people
Re:Originally posted by: guy
Originally posted by: akubi
rofl….
only alphanumeric characters and underscores are allowed. must not start with a digit either
Yes – learn the proper syntax for the language that you are using. Helps a lot
I think that's what he was trying to do…
Re:Originally posted by: akubi
rofl….
only alphanumeric characters and underscores are allowed. must not start with a digit either
Yes – learn the proper syntax for the language that you are using. Helps a lot
Re:Originally posted by: guy
I'm encountering a strange error with lines written like such:
uint8_t PotM$potSetting;
where uint8_t is typedefed above, yields the following errors
/tmp/cc0twSga.s:134: Error: expected comma after symbol-name
/tmp/cc0twSga.s:134: Error: unknown opcode `potsetting'
If I remove the $ and everything before it, in this case PotM$, leaving only uint8_t potSetting, the error goes away. So is the $ character special in variable names?
Not 100% sure, but I think you can only have alphanumeric characters in variable names…
Re:rofl….
only alphanumeric characters and underscores are allowed. must not start with a digit either
0 Comments.