Every beginner or advance or even the intermediate users in coding or programming are supposed to know the syntaxes and their color definitions and what they do. In addition, this helps most programmers to determine whether their focus is running per their wants and needs.
Let’s take a break down of common lines of code in programming or coding with their typical colors and above all, the meaning to each of hem in programming.
-
Keywords:
They have blue or purple : they always come with the following syntaxes or commands such as if, else, for, while, class, and def etc. They are known to be a reserved words in a programming language that have a specific meaning. Meanwhile, they are often colored in the aforementioned colors to separate them from other codes.
-
Variables:
Variables comes in black and Green: commands such as x, myVariables, username and more are noted to have been common as well. Meanwhile, these are names given to storage locations that holds values. They are known well to be a user defined one.
-
Data Types
Examples of datatype syntaxes are brown and Orange: commands such as int, string, float, Boolean and many more. They often also declare and specify the type of values a variable can hold.
-
Function
The assigned colors for function is Green and Yellow. Its related commands or syntaxes are myFunction, calculateArea, pirint etc. nationwide, they are referred to be known as the block of codes that perform a specific task in programming.
-
Comments
Comments, also comes with Gray and Green, examples of its commands are //, /, #. They are notes left by the programmer as in comment section or simply notes that explains more in-depth about the code written.
- Strings, has a purple or Blue: commands such as hello, hello…etc
- Numbers, also comes in blue and black
There are more to the aforementioned, however, these are just the few for every beginner to know, when building codes or programming and has to know the color coding having mastery command over them.
About Author
Discover more from SURFCLOUD TECHNOLOGY
Subscribe to get the latest posts sent to your email.