» it.Convenzioni per lo stile del codice
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

it.Convenzioni per lo stile del codice

English | French | Spanish

The original english version of this page is newer and may contain information this translation does not have! Click here to view the english version.

Per una migliore leggibilità e standardizzazione del codice di vvvv, dovremmo tutti conformarci agli stili di codice qui presentati.

MAIUSCOLE\minuscole, "Casing"

Definizioni

Pascal Casing

 RedHotChilliPeppers

Camel Casing

 redHotChilliPeppers

Classi

  • Pascal Casing
//buono
class RedHot
 
//no buono
class TRedHot
class redhot

Interfacce

  • cominciate con una I (per Interfaccia) e poi Pascal Casing
//buono
interface IRedHot
 
//no buono
interface RedHotInterface
interface Iredhot

Variabili di Classe

  • cominciate con una F (per Field, campo) e poi Pascal Casing
//buono
int FChilliPepper
 
//no buono
int ChilliPepper 
int FchilliPepper

Variabili Locali, Argomenti delle Funzioni

  • Camel Casing
//buono
int redPepper;
void Foo(int barCode);
 
//no buono
int Redpepper;
int RedPepper;
void Foo(int BarCode);

Variabili Globali

  • cominciate con una G e poi Pascal Casing
//buono
int GChilliPepper;
 
//no buono
int ChilliPepperGlobal;
int GchilliPepper;

Funzioni

  • Pascal Casing
//buono
PlayMusic();
 
//no buono
playMusic();

Eventi

  • cominciate con On.. e poi Pascal Casing
//buono
OnExplode
 
//no buono
Explode
Onexplode

Eventi di Callback

  • vengono chiamati come gli eventi corrispondenti
  • terminano con ..CB
//buono
ExplodeCB()
 
//no buono
ExplosionCB()
explodeCB()

Parentesi

  • le parentesi sono sempre in una nuova riga
//buono
if true then
{ 
 ...
};
 
//no buono
if true then { ... };
if true then {
   ...
 };

Indentazione

  • usate sempre 4 spazi

Spaziatura

  • c'è sempre un singolo spazio dopo una virgola o un punto e virgola, mai prima
//buono
MyFunction(a, b);
 
//no buono
MyFunction( a , b );
  • singoli spazi circondano gli operatori (eccetto operatori unari come imcremento e not logico)
//buono
a = b;                       
for (int i = 0; i < 10; ++i) 
 
//no buono
a=b;                             
for (int i=0; i<10; ++i)

Altre linee guida

Tenete presente che certe incompatibilità con le guide proposte sotto (che pure differiscono tra loro) sono deliberate.

Mono Coding Guidlines

.Net Design Guidlines

Sharp Develop Coding Guidlines

anonymous user login

Shoutbox

~8d ago

joreg: Postponed: Next vvvv beginner course starting April 29: https://thenodeinstitute.org/courses/vvvv-beginner-class-summer-2024/

~1mth ago

~1mth ago

joreg: The Winter Season of vvvv workshops is now over but all recordings are still available for purchase: https://thenodeinstitute.org/ws23-vvvv-intermediates/

~1mth ago

schlonzo: Love the new drag and drop functionality for links in latest previews!

~2mth ago

joreg: Workshop on 29 02: Create Sequencers and Precise Clock Based Tools. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-08-create-sequencers-and-precise-clock-based-tools-in-vvvv-gamma/

~2mth ago

joreg: Workshop on 22 02: Unlocking Shader Artistry: A Journey through ‘The Book of Shaders’ with FUSE. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-12-book-of-shaders/