![]() I'm wondering why #pragma config lines HAVE to be the first lines. Ive noticed this problem also with the other yuggothware programs. Robotc file, I came across somewhere that it is a. Download Link: There are 3 main libraries that are used to interface with RobotC. I understand that the error is caused by having the //comment on the second line of the program, as #pragma config() lines have to be the first line(s) of the program. For robotc, you can âstringifyâ human/robot sound voice and use it in RobotC. What is the reason for that first error? I can't find anything on the documentation listing a reason why #pragma config() has to be the first lines of the source file, just that it has to be.ĮDIT: To clarify. ![]() ![]() When I run this simple program, I get the following compilation errors: **Error**:'#pragma config(.)' must be first lines of source file ![]() NxtDisplayTextLine(1,"%i",SensorValue(touch2)) NxtDisplayTextLine(0,"%i",SensorValue(touch)) #pragma config(Sensor, S2, touch2, SensorTouch) #pragma config(Sensor, S1, touch, SensorTouch) A strange quirk in robotC that I've noticed is that, for some reason, #pragma config preprocessor directives only work when they are the first lines of the program. I'm a tutor for an undergrad class in robotics, and we use robotC (for NXT robotics, version 4.50) as the platform of choice.
0 Comments
Leave a Reply. |