Is 'direction' a keyword?

I tried defining a variable called 'direction' but the IDE turned it orange, indicating a keyword. I can't find anything in referrence about it. I'm curious as to what it does and how to use it.

I've renamed the variable as 'compass'.

indicating a keyword.

All that means is that some library developer decided that direction was a keyword. If you are not using that library, or not using that function/method/whatever, then the color is useless/incorrect in your context.

I've renamed the variable as 'compass'.

I'd put it back, if direction makes more sense.

Sometimes to avoid conflict with these library or system parameters, I would define my_direction or robot_direction etc. Also as a library developer, I would define things like phi_prompt_direction instead of direction to avoid conflict with another developer.

Thanks for your replies, guys. I'll probably go with 'my_direction', or something similar, as this is more meaningful. It's a boolean that holds 0 for forward and 1 for reverse.

Happy to help. More people program well = less work for all the rest of us :smiley: