Re: [exim] invalid integer

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Cyborg
Datum:  
To: Konstantin, exim-users
Betreff: Re: [exim] invalid integer
Am 03.06.2014 12:45, schrieb Konstantin:
> exim -be '${if >={15.1}{14}{yes}{no}}'

Specs talk about integers, floats are not integers.

For example:
${if >{$message_size}{10M} ...
Note that the general negation operator provides for inequality testing.
The two strings must take
the form of optionally signed decimal*integers*, optionally followed by
one of the letters “K” or
“M” (in either upper or lower case), signifying multiplication by 1024
or 1024*1024, respectively.
As a special case, the numerical value of an empty string is taken as zero.
In all cases, a relative comparator OP is testing if <string1> OP
<string2>; the above example is
checking if $message_size is larger than 10M, not if 10M is larger than
$message_size.


6.12 Integer values
If an option’s type is given as “integer”, the value can be given in
decimal, hexadecimal, or octal. If it
starts with a digit greater than zero, a decimal number is assumed.
Otherwise, it is treated as an octal
number unless it starts with the characters “0x”, in which case the
remainder is interpreted as a
hexadecimal number.
If an integer value is followed by the letter K, it is multiplied by
1024; if it is followed by the letter M,
it is multiplied by 1024x1024. When the values of integer option
settings are output, values which are
an exact multiple of 1024 or 1024x1024 are sometimes, but not always,
printed using the letters K
and M. The printing style is independent of the actual input format that
was used.