I have a source program that I cannot open anymore from ROBOTC IDE.
I can open it from MS-VS, NotePad,... without any issue...
The task manager display ROBOTC.EXE 100% CPU busy...
In fact I stay stuck on the ROBOTC splash screen...

any help welcome.

thanks.

jm.

_________________SuntzuMaster- a French gentlemen in USA.

Mon May 21, 2007 9:01 pm

SuntzuMaster

Rookie

Joined: Sun Apr 15, 2007 8:33 amPosts: 40Location: USA

PS: I am using the ROBOTC v 1.05.

_________________SuntzuMaster- a French gentlemen in USA.

Mon May 21, 2007 9:02 pm

SuntzuMaster

Rookie

Joined: Sun Apr 15, 2007 8:33 amPosts: 40Location: USA

I found the code that is creating trouble and that the compiler loop....

I think that some compiler debug should be done... This code is a development in progress... If needed I can send or post the fulll source program.

This is a new bug in the RobotC compiler. The compiler goes into an infinite loop when a "continue" statement is used within a "switch" block.

This is corrected in version 1.06.

There are a couple of other problems in your program that you should correct as well. Replace the "*" with a "&" in the function declaration. While RobotC accepts this syntax today this is an anomoly (i.e. bug or unsupported function) and RobotC treats this as a "&". In future, you may get compile errors if RobotC supports proper pointer variables.

I would recommend removing the "inline" qualifier from your function declaration as well.

Wed May 30, 2007 1:35 am

SuntzuMaster

Rookie

Joined: Sun Apr 15, 2007 8:33 amPosts: 40Location: USA

I am using "inline" because I call that function from two different tasks.
Is that something that is not appropriate from ROBOTC compiler standard?
I was thinking that the "&" was used to pass a parameter to a function by address and then the function prototype have to use "int * x" to tell that a parameter is an address to an integer?

I am still very "C" ANSI, "C++" and "C#" then because I was unable to find a language reference book about ROBOTC I tried to guess what can be done based on my "C" skills... By the way any idea on when more documentation could be available?

Does ROBOTC support pointeur based algebra?

Could you tell me what is the right way to concatenate string variables:
in "C" I was used to "strcat, strncat,..." I found that wiith ROBOTC I can used s1 = s2 + s3 + s4.... looks like "C#" or even "Java" is that the right way to do that?

I think that I have found another bug... I have to test it again and if I am able to reproduce it I shall post a new open issue on the bug tracker application.

thanks

jm.

PS: When does the 1.06 be available?.

_________________SuntzuMaster- a French gentlemen in USA.

Wed May 30, 2007 7:45 pm

Dick Swan

Creator

Joined: Fri Feb 09, 2007 9:21 amPosts: 615

ROBOTC does not support pointer variables. Not because they're difficult to support but because they introduce too much risk in thing going awry without an easy way to figure out why.

ROBOTC does support the standard "call by reference" variables found in C++. Which incidently, utilize pointers but in a controlled fashion managed by the compiler. You simply declare your function variables with the "&" qualifier to indicate that it is a call-by-reference variable. When you call function, the compiler will generate a reference (i.e. pointre containing the address) for the variable. All accesses to the function variable will use this pointer value; this is a convenient way to have the function update values of its parameters and have the results returned to the calling program.

Who is online

Users browsing this forum: No registered users and 2 guests

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