Ci-dessous, les différences entre deux révisions de la page.
— | fr:cachevariables [2022/07/05 14:05] (Version actuelle) – créée : début de la traduction paulhenrysaux | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | FIXME **Cette page n'est pas encore traduite entièrement. Merci de terminer la traduction**\\ // | ||
+ | ====== Calculateur avec variables ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Pour chaque [[.: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Cela peut s' | ||
+ | |||
+ | Vous pouvez utiliser cet onglet comme une aide autonome pour effectuer certains calculs ou vous pouvez également réutiliser toute variable définie ici pour générer un nouveau [[.: | ||
+ | |||
+ | Les sections suivantes de cette page décrivent le contenu et la fonctionnalité de nouvel onglet. | ||
+ | |||
+ | ===== Partie " | ||
+ | |||
+ | Dans la partie supérieure de l' | ||
+ | {{ : | ||
+ | |||
+ | ^ Bouton ^ Description ^ | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |||
+ | ===== Partie " | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Cette section permet de saisir la valeur ou la formule des variables générées. Plusieurs commandes sont disponibles : | ||
+ | |||
+ | ^ Bouton ^ Action ^ | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
+ | |||
+ | Le texte situé sous le champ de valeur affichera un aperçu du résultat. Il peut s'agir du résultat concret de la formule ou d' | ||
+ | |||
+ | |||
+ | ===== Syntaxe des formules ===== | ||
+ | |||
+ | Le champ de valeur de chaque variable peut contenir différents types de valeurs ainsi que d' | ||
+ | |||
+ | <WRAP center round info 100%> | ||
+ | N'ayez pas peur de la syntaxe. Bien qu' | ||
+ | </ | ||
+ | |||
+ | La syntaxe est expliquée en détail dans les sous-chapitres suivants. | ||
+ | Cependant, pour avoir un aperçu rapide de ce qui est pris en charge, des exemples sont donnés ici : | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | |||
+ | |||
+ | ==== Types de valeur ==== | ||
+ | |||
+ | La syntaxe prend en charge trois types de valeurs. | ||
+ | La saisie est libre, en général le résultat de la formule essaiera de s' | ||
+ | |||
+ | ^ Type ^ Description ^ Syntaxe ^ Exemple ^ | ||
+ | |Nombre entier | Nombre sans chiffres après la virgule | Utiliser les chiffres | '' | ||
+ | |Nombre decimal | Nombre avec des chiffres après la virgule | Utiliser les chiffres avec un point ou une virgule | '' | ||
+ | |Chaine de caractère | Texte | Valeurs entourées par '' | ||
+ | |||
+ | |||
+ | ==== Opérateurs numériques ==== | ||
+ | |||
+ | The following numeric operators are supported: | ||
+ | |||
+ | ^ Operator ^ Function ^ Example ^ | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |''/'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |||
+ | ==== Relational operators and conditions ==== | ||
+ | |||
+ | Relational operators like ''<'' | ||
+ | |||
+ | For example, the expression '' | ||
+ | |||
+ | Relational operators are especially used in the '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | This means, that if the function was given 5 parameters then: | ||
+ | * If the first parameter is true, then the second is returned | ||
+ | * Else if the third parameter is true, then the fourth parameter is returned | ||
+ | * Else the fifth parameter is returned | ||
+ | |||
+ | For example '' | ||
+ | |||
+ | ^ Operator ^ Meaning ^ Example ^ | ||
+ | |'' | ||
+ | | ''<>'' | ||
+ | |''<'' | ||
+ | | ''< | ||
+ | |''>'' | ||
+ | |''> | ||
+ | |||
+ | ==== Functions ==== | ||
+ | |||
+ | Functions all start with a letter, contain only letters and digits and have a directly attached parameter list in parenthesis. Multiple parameters are separated using '';'' | ||
+ | |||
+ | An example for a one-parameter function call is '' | ||
+ | |||
+ | The following functions are defined: | ||
+ | |||
+ | ^ Function ^ Synonyms ^ Description ^ Parameter 1 ^ Parameter 2 ^ Example ^ | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |||
+ | |||
+ | ==== Variables ==== | ||
+ | |||
+ | Variables are used in a formula as placeholders for values. When a formula containing a variable is evaluated, it needs to be passed a value for each of the contained variables in order to be correctly evaluated. | ||
+ | |||
+ | Variable names are case sensitive and have to start with an alphanumeric char. Remaining chars can be alphanumeric or digits. | ||
+ | Examples for legal variable names are: '' | ||
+ | |||
+ | One-letter-variables can just be typed into the formula and will be evaluated along. For example, the formula '' | ||
+ | |||
+ | If multiple chars are concatenated within a formula, they will be interpreted as individual one-letter-variables. For example, the formula '' | ||
+ | |||
+ | Variable names longer than one char can be declared in Unix-Bash-Style by prepending their name with '' | ||
+ | |||
+ | In situations where variable name conflicts with following alphas/ | ||
+ | |||
+ | Some more complex examples: | ||
+ | |||
+ | * The formula '' | ||
+ | * The formula '' | ||
+ | * The formula '' | ||
+ | * The formula '' | ||
+ | * Using '' | ||
+ | |||
+ | ==== Concatenations ==== | ||
+ | |||
+ | If multiple expressions are concatenated directly after another with no separating operator, values are concatenated to a consecutive expression. This expression evaluates to a number if it forms a valid numeric expression, otherwise it evaluates to a text value. | ||
+ | |||
+ | Expressions, | ||
+ | |||
+ | For example, the formula '' | ||
+ | ==== Overflow character ==== | ||
+ | |||
+ | In concatenated expressions, | ||
+ | |||
+ | An example should make the usage clear: | ||
+ | |||
+ | * The Formula '' | ||
+ | * The Formula '' | ||
+ | * The Formula '' | ||
+ | * The Formula '' | ||
+ | * The Formula '' | ||
+ | |||
+ | |||
+ | ==== Range expressions ==== | ||
+ | |||
+ | You can specify ranges in formulas using '' | ||
+ | |||
+ | **FIXME** Link to anchor on waypoint calc page as soon as its updated to cover waypoint generation with ranges. | ||
+ | |||
+ | An example for a range expression is '' | ||
+ | |||
+ | You may specify consecutive values using '','' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | When a range is used in a context where only one value is allowed (this is the case in normal calculation), | ||
+ | |||
+ | Ranges currently support only positive constant integer values. A range must always be evaluate to at least 1 value and a range may not evaluate to more than 20 values. For example the following ranges are invalid: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | A formula may include one or more range definitions mixed with normal other formula parts. For example the following formulas are valid: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | |||
+ | ==== Comments ==== | ||
+ | |||
+ | You may enter comments into formula expressions using the ''#'' | ||
+ | * '' | ||
+ | * '' |