Board index » cppbuilder » C++ Syntax Highlighting error

C++ Syntax Highlighting error


2007-10-21 04:36:34 PM
cppbuilder81
Hi,
The C++ syntax highlighting does not like numeric literals like 1u.
These are flagged as invalid characters.
I tend to leave the syntax alone except for octal and invalid
characters, both of which tend to be mis-typing - something I'm good at
:-)
Moving from C++2007 to BDS2007 caused some compilation errors.
Ambiguity between '... CheckEquals(int,int,System::AnsiString) ... And
CheckEquals(unsigned int,unsigned int,System::AnsiString) ...
The simple fix was changing numeric literals from '1' to '1u'. Now I
can find the in the code easily thanks to the highlighting :-)
Richard
 
 

Re:C++ Syntax Highlighting error

In article < XXXX@XXXXX.COM >,
Richard Quartermaine < XXXX@XXXXX.COM >wrote:
Quote
The C++ syntax highlighting does not like numeric literals like 1u.
These are flagged as invalid characters.
I am unable to duplicate this. Check your highlighting settings to
make sure that your settings for highlighting a number are correct.
--
-David
 

Re:C++ Syntax Highlighting error

I've re-checked and it's not as simple as I thought. Code like this is
OK:
int a = 1U;
Code like this gives the error:
CheckEquals(0U,nph.GetParamCount(),"Param count must be zero");
Richard
 

{smallsort}

Re:C++ Syntax Highlighting error

In article < XXXX@XXXXX.COM >,
Richard Quartermaine < XXXX@XXXXX.COM >wrote:
Quote
Code like this gives the error:

CheckEquals(0U,nph.GetParamCount(),"Param count must be zero");
Looks like a small bug in the parser. if you put a space on either
side of the first comma the highlighting is correct. Please enter this
in QC and I'll promote it.
--
-David
 

Re:C++ Syntax Highlighting error

David Dean [CodeGear] wrote:
Quote
Please enter this
in QC and I'll promote it.
QC 54122
 

Re:C++ Syntax Highlighting error

In article < XXXX@XXXXX.COM >,
Richard Quartermaine < XXXX@XXXXX.COM >wrote:
Quote
>Please enter this
>in QC and I'll promote it.

QC 54122
It looks like Leo beat me to it. 8-) It's now open.
--
-David