ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
TRUE
|
|
FALSE
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -All programs must end with a ‘Stop’ command.
Detailed explanation-2: -The Wait-command can make the robot program wait for a given time, before proceeding. It can also be used to wait for a an input to have a defined state, before moving on. Go to the “Program"-tab (1) in the Program Robot section.
Detailed explanation-3: -The most basic kind of statement in ROBOTC simply gives a command to the robot. 3. The motor[port3] = 127; statement in the sample program you downloaded is a simple statement that gives a command. 4. It instructs the motor plugged into Motor Port 3 to turn on at full power.
Detailed explanation-4: -ROBOTC (conditions) are always Boolean statements. They are always either true or false at any given moment. Try asking yourself the same question the robot does – for example, whether the value of the Ultrasonic Sensor is greater than 45 or not. Pick any number you want for the Ultrasonic Sensor value.