This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
es:orx:config:syntax [2012/03/07 16:30 (14 years ago)] – [Herencia] zera | es:orx:config:syntax [2020/08/20 04:15 (5 years ago)] (current) – Old content sausage | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Sintaxis de configuración ====== | ||
- | |||
- | |||
- | ===== Sintaxis básica ====== | ||
- | |||
- | Como es tradicional en los [[http:// | ||
- | Estas parejas están organizadas en secciones. | ||
- | |||
- | Una sección es declarada con corchetes ('' | ||
- | Esta sección termina cuando otra comienza. | ||
- | |||
- | <code ini> | ||
- | |||
- | Llaves y valores son delimitados con signo de igual ('' | ||
- | |||
- | <code ini>Key = Value</ | ||
- | |||
- | Punto y coma ('';'' | ||
- | |||
- | <code ini>; Esto es un comentario y será ignorado por el módulo de configuración</ | ||
- | |||
- | Las secciones pueden ser definidas en más de un lugar. Incluso pueden abarcar varios ficheros de configuración. | ||
- | |||
- | He aquí un ejemplo. | ||
- | |||
- | <code ini>; Aquí tenemos un ejemplo de una sintaxis de configuración de orx | ||
- | [MySection] ; Esto define el inicio de ' | ||
- | MyKey = MyValue; Aquñi damos un valor a ' | ||
- | MyOtherKey = MyOtherValue; | ||
- | |||
- | [MyOtherSection]; | ||
- | AKey = Otro valor | ||
- | |||
- | [MySection]; | ||
- | MyLastKey = MyLastValue; | ||
- | |||
- | **PD: Los espacios alrededor del operador de asignación (' | ||
- | |||
- | Si quieres usar un ';' | ||
- | |||
- | <code ini> | ||
- | MyOtherKey = "Este valor | ||
- | se extiende | ||
- | en múltiples lineas"</ | ||
- | |||
- | Si doblas las primeras '''', | ||
- | |||
- | <code ini> | ||
- | Aquí la cadena '''' | ||
- | ===== Herencia ===== | ||
- | |||
- | The inheritance system is based on the same idea than [[wp> | ||
- | |||
- | The basic idea is that all the keys defined in a section can be inherited by any other section ((cyclic inheritance is **not** supported)).\\ | ||
- | The inheriting section (aka the child section) can then add new keys or even override any key defined in the parent section. | ||
- | |||
- | In order to do so, the arobase (' | ||
- | |||
- | <code ini> | ||
- | MyKey1 = MyValue1 | ||
- | MyKey2 = MyValue2 | ||
- | |||
- | [Child@Parent]; | ||
- | |||
- | If you don't want to inherit a whole section, you can also use inheritance directly for a single key.\\ | ||
- | If the parent key doesn' | ||
- | |||
- | <code ini> | ||
- | MyKey = MyValue | ||
- | MyOtherKey = MyOtherValue | ||
- | |||
- | [Child] | ||
- | MyKey = @Parent; <= The value for ' | ||
- | MyLastKey = @Parent.MyKey; | ||
- | |||
- | In the previous example, we see that both ' | ||
- | In this example, the key ' | ||
- | |||
- | When using inheritance, | ||
- | Inherited values can be chained as seen in the example below. | ||
- | |||
- | <code ini> | ||
- | MyKey = MyValue | ||
- | MyOtherKey = MyOtherValue | ||
- | |||
- | [Parent] | ||
- | MyKey = @GrandParent | ||
- | |||
- | [Child@Parent]</ | ||
- | |||
- | In the section ' | ||
- | ===== Includes ===== | ||
- | |||
- | |||
- | |||
- | ===== Valores numéricos ===== | ||
- | |||
- | |||
- | ==== Tipos básicos ==== | ||
- | |||
- | |||
- | ==== Vector ==== | ||
- | |||
- | |||
- | ==== Aleatorio ==== | ||
- | |||
- | |||
- | ===== Listas ===== |