Lines of codes and their colors and meaning in programming/coding

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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. Strings, has a purple or Blue: commands such as hello, hello…etc

 

  1. 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.

Related posts:

About Author


Discover more from SURFCLOUD TECHNOLOGY

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from SURFCLOUD TECHNOLOGY

Subscribe now to keep reading and get access to the full archive.

Continue reading