Live manual

Live Systems

<< previous toc next >>

Manual de Live Systems

Estilo de código

15. Estilo de código

En este capítulo se documenta el estilo de código utilizado en los sistemas en vivo.

15.1 Compatibilidad

15.2 Sangrado

15.3 Ajuste de líneas

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 Miscelánea


<< previous toc next >>