AXIOMTEK DSA-132 Series Informations techniques Page 27

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 189
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 26
Manual:Scripting
24
Line joining
Two or more physical lines may be joined into logical lines using backslash character (\). A line ending in a
backslash cannot carry a comment. A backslash does not continue a comment. A backslash does not continue a token
except for string literals. A backslash is illegal elsewhere on a line outside a string literal.
:if ($a = true \
and $b=false) do={ :put $a $b; }
:if ($a = true \ # bad comment
and $b=false) do={ :put $a $b; }
# comment \
continued invalid (syntax error)
Whitespace between tokens
Whitespace can be used to separate tokens. Whitespace is necessary between two tokens only if their concatenation
could be interpreted as a different token. Example:
{
:local a true; :local b false;
# whitespace is not required
:put (a&&b);
# whitespace is required
:put (a and b);
}
Whitespace are not allowed
between '<parameter>='
between 'from=' 'to=' 'step=' 'in=' 'do=' 'else='
Example:
#incorrect:
:for i from = 1 to = 2 do = { :put $i }
#correct syntax:
:for i from=1 to=2 do={ :put $i }
:for i from= 1 to= 2 do={ :put $i }
#incorrect
/ip route add gateway = 3.3.3.3
#correct
/ip route add gateway=3.3.3.3
Vue de la page 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 188 189

Commentaires sur ces manuels

Pas de commentaire