17.6k views
4 votes
Which one of these representations of Task Main will work in ROBOTC?

a. Task main ()
b. task main ()
c. Task Main ()
d. task main;

User Lucask
by
8.9k points

1 Answer

4 votes

Final answer:

The correct representation of the main task in ROBOTC is 'task main()' because ROBOTC is case-sensitive and the task keyword should be in lowercase followed by the function name with parentheses.

Step-by-step explanation:

The correct representation of the main task in ROBOTC is option (b) task main(). In ROBOTC, functions and tasks are defined using lowercase letters. Therefore, the main task should begin with a lowercase 't' and followed by the keyword task, then a space, and then the name of the task which is main. The parentheses '()' indicate that it is a callable function or task without parameters. Remember to include the parentheses after main, as option (d) lacks them. It's also important to note that ROBOTC is case-sensitive, so 'Task' and 'task' are recognized differently, and the correct usage is 'task'.

User Sjaak
by
8.1k points