View unanswered posts | View active topics It is currently Sat Jun 23, 2018 12:40 am

Reply to topic  [ 3 posts ] 
Compiler: not case-sensitive? 
Author Message
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Compiler: not case-sensitive?
in RobotC the compiler always changes function or variable names by himself, such as:
*Warning*:Substituting similar variable 'Xyz' for 'xyz'. Check spelling and letter case.

this substituting is not C-conform.
C is case-sensitive, and so both variables, Xyz and xyz, may exist besides one another.

Due to C conformity, the compiler should give a hint, but must not change this by himself.

Or is this a user defined adjustment? I didn't find anything anywhere...

HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}

Sat May 24, 2008 12:27 pm
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 620
This feature is showing how ROBOTC was developed for Education in specific. ROBOTC does this to assist new users who may have a typo in their program by using improper-case structure.

I'll see if there's a way to create an option in the compiler to disable this feature, but don't expect this option to be included in the final 1.30 release... this has been a Day-1 feature of ROBOTC.

In the mean time, just use a different variable name.

Timothy Friez
ROBOTC Developer - SW Engineer

Wed May 28, 2008 10:08 am
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
thx for your reply.
As you are selling RobotC as "real C", 1st preference always should be ANSI C compatibility (C99,...) , and NOT educational or didactic intentions.

Language extensions and simplifications are welcome and appreciated, but the basic C (ANSI C 99) language definitions and command sets should always be supported.

After all, a (pre-) compiler hint to "check spelling" would fit, why make an immediate substitution by the compiler ?

But meanwhile I surely will use different file names.

Thu May 29, 2008 3:25 am
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.