Live manual

Live Systems

<< previous toc next >>

Manuel Live Systems

Style de code

15. Style du code

Ce chapitre documente le style du code utilisé dans les systèmes live.

15.1 Compatibilité

15.2 Indentation

15.3 Adaptateur

Mal:

if foo; then
         bar
fi

Bien:

if foo
then
         bar
fi

Mal:

Foo () {
         bar
}

Bien:

Foo ()
{
         bar
}

15.4 Variables

Mal:

FOO=bar

Bien:

FOO="bar"

Mal:

if [ -f "${FOO}"/foo/"${BAR}"/bar ]
then
         foobar
fi

Bien:

if [ -f "${FOO}/foo/${BAR}/bar" ]
then
         foobar
fi

15.5 Autres


<< previous toc next >>