I'm just really curious because some codes really follow a format like this. Examples include serial.begin(), serial.println() and when I used servomotors the left part was the name of the servomotor, which I declared. I want to know what concept does the code with a format of Text1.Text2() refer to? What do you call Text1 and Text2? Are there official or commonly used terminologies for the concepts and parts such as "variable", "statement", "code"?
To add to my understanding, it appears that Text1 refers to an object and that Text2 has the concept of "function" where it performs something related to the object. Though I would think that another terminology would be possessed by Text2 other than function to distinguish it from a function since it is required to be written in the format I mentioned, which next to the object with a period separating them and no spaces at all.
Text1.Text2()
could mean differs greatly by language, even if this may be a syntactically valid statement in many languages.Text1
is here: An instance of a class.Text2()
in turn is a member function of that class, which can act upon the variables of that particular instance. You can google tutorials about C++ classes to find out more. Note, that in C/C++ classes and structs are very similar. So you use a similar syntax to refer to member variables of a struct instance.