Live manual

Live Systems

<< previous toc next >>

Manual de Live Systems

Estil de Codi

15. Estil de Codi

En aquest capítol es documenta l'estil de codi utilitzat a live systems.

15.1 Compatibilitat

15.2 Indentació

15.3 Ajust de línia

Mal:

if foo; then
         bar
fi

Bé:

if foo
then
         bar
fi

Mal:

Foo () {
         bar
}

Bé:

Foo ()
{
         bar
}

15.4 Variables

Mal:

FOO=bar

Bé:

FOO="bar"

Mal:

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

Bé:

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

15.5 Miscel·lània


<< previous toc next >>