- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I use PSOC creator 3.3 build code, I got different color for code.
For example, after "if" and "else", one area all code are light color, another area code are dark color.
Can I assume the dark color code is real, the light is skipped?
Where I can find the color definition?
Thank you everyone help!
Richard Li
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, with a #if the grayed-out code block will not be generated or compiled. On your post you were talking about "if" which is treated differently: even when you write
if(0) DoSomething(trivial);
the code will be seen by the compiler. Optimization will kick it out, but errors will be flagged. All that is not the case with a #if.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Richard!
The code colours are adjustable. Macros, non executable code, comments, strings are coloured differently. Can you show us a (complete) example where you have a question for?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use default PSOC Creator 3.3 setup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, with a #if the grayed-out code block will not be generated or compiled. On your post you were talking about "if" which is treated differently: even when you write
if(0) DoSomething(trivial);
the code will be seen by the compiler. Optimization will kick it out, but errors will be flagged. All that is not the case with a #if.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Bob!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome, Richard.
Bob