» fr.Conventions et style de code
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

fr.Conventions et style de code

English | Italian | Spanish

Afin de faciliter la lecture et la standardisation du code dans vvvv, merci de suivre ces quelques conventions :

Casse

Définitions

Pascal Casing

 RedHotChilliPeppers

Camel Casing

 redHotChilliPeppers

Classes

  • Pascal Casing
//bien
class RedHot
 
//pas bien
class TRedHot
class redhot

Interfaces

  • commencent par un I (comme Interface) et s'écrivent en Pascal Casing
//bien
interface IRedHot
 
//pas bien
interface RedHotInterface
interface Iredhot

Variables de classe

  • commencent par un F (comme Field) et s'écrivent en Pascal Casing
//bien
int FChilliPepper
 
//pas bien
int ChilliPepper 
int FchilliPepper

Variables locales, arguments

  • Camel Casing
//bien
int redPepper;
void Foo(int barCode);
 
//pas bien
int Redpepper;
int RedPepper;
void Foo(int BarCode);

Variables globales

  • commencent par un G et s'écrivent en Pascal Casing
//bien
int GChilliPepper;
 
//pas bien
int ChilliPepperGlobal;
int GchilliPepper;

Fonctions

  • Pascal Casing
//bien
PlayMusic();
 
//pas bien
playMusic();

Événements

  • commencent par On.. et s'écrivent en Pascal Casing
//bien
OnExplode
 
//pas bien
Explode
Onexplode

Callbacks

  • portent le même noms que les événements auxquels ils font référence
  • mais terminent par ..CB
//bien
ExplodeCB()
 
//pas bien
ExplosionCB()
explodeCB()

Parenthèses

  • les parenthèses sont toujours sur une nouvelle ligne
//bien
if true then
{ 
 ...
};
 
//pas bien
if true then { ... };
if true then {
   ...
 };

Indentation

  • utilisez toujours 4 espaces

Espacements

  • il y a toujours un espace après un point ou un point-virgule, jamais avant
//bien
MyFunction(a, b);
 
//pas bien
MyFunction( a , b );
  • un espace de part et d'autre des opérateurs (sauf les opérateurs unaires comme l'incrémentation ou le NOT logique)
//bien
a = b;                       
for (int i = 0; i < 10; ++i) 
 
//pas bien
a=b;                             
for (int i=0; i<10; ++i)

Autres guidelines

Notez que les différences avec les autres guides listés ci-dessous (qui différent aussi entre eux) sont volontaires.

Mono Coding Guidlines

.Net Design Guidlines

Sharp Develop Coding Guidlines

anonymous user login

Shoutbox

~39min ago

joreg: Workshop on 20 06: All about Raymarching with FUSE, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-all-about-raymarching-with-fuse/

~4d ago

joreg: vvvv gamma 6.5 is out, see changelog: https://thegraybook.vvvv.org/changelog/6.x.html

~8d ago

joreg: Workshop on 13 06: All about signed distance fields in FUSE, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-all-about-signed-distance-fields-with-fuse/

~15d ago

joreg: Workshop on 06 06: All about noise Functions with FUSE, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-all-about-noise-functions-with-fuse/

~21d ago

joreg: Workshop on 29 05: Introduction to the core FUSE principles, signup here: https://thenodeinstitute.org/courses/ss24-vvvv-introduction-to-core-fuse-principles/

~27d ago

joreg: Workshop on 23 05: Integrating Rhino 3D with vvvv, Signup here: https://thenodeinstitute.org/courses/ss24-vvvv-integrating-rhino-3d-with-vvvv/

~1mth ago

joreg: Workshop on 16 05: Introduction to Shaders. Signup here: https://thenodeinstitute.org/courses/ss24-vvvv-introduction-to-shaders-in-vvvv/

~1mth ago

bjoern: hello, I am looking for a job / project starting june. get in touch via vvvv specialists available for hire

~1mth ago

joreg: Workshop on 09 05: Deepdive into the Stride 3D Engine. Signup here: https://thenodeinstitute.org/courses/ss24-vvvv-advanced-3d-rendering-in-vvvv-with-stride/