Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter
to the top
>
>
>
Source code

Source code

05 Avr 2013

Computer program code is a text written in any of the programming languages. It is first of all meant to be written and edited by a human. Computer program code is also called source code or software source text.

Source code is transformed into executable processor instructions prior to being executed by a compiler or is directly executed by an interpreter of a programming language.

When writing computer program code, it's important that you stick to the following rules:

  • the code must be readable and comprehensible;
  • it must be easy to modify and debug;
  • there must be as few compiler warnings as possible for this code.

It's first of all humans who need code formatting and accurate editing. The compiler can easily figure out a text like this:

int foo(int N)
{int i=0;for(int y=0;y<N;y++){i+=y*y;}return i;}

But you agree that a human will find it hard to understand what exactly the program does, don't you? And here is a code that does quite the same thing, while being edited in a proper way:

int Sum(int N)
{
  int sum = 0;
  for (int i = 0; i < N; i++)
  {
    sum += i * i;
  }
  return sum;
}

When a software product is being developed by several developers, it's a good practice to follow a single coding standard to make the code clear to others. It will significantly simplify computer program code development and maintenance.

References

Popular related articles

S'abonner

Comments (0)

close comment form
close form

Remplissez le formulaire ci‑dessous en 2 étapes simples :

Vos coordonnées :

Étape 1
Félicitations ! Voici votre code promo !

Type de licence souhaité :

Étape 2
Team license
Enterprise licence
** En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité
close form
Demandez des tarifs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
La licence PVS‑Studio gratuit pour les spécialistes Microsoft MVP
close form
Pour obtenir la licence de votre projet open source, s’il vous plait rempliez ce formulaire
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
I want to join the test
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
check circle
Votre message a été envoyé.

Nous vous répondrons à


Si l'e-mail n'apparaît pas dans votre boîte de réception, recherchez-le dans l'un des dossiers suivants:

  • Promotion
  • Notifications
  • Spam