Re: [exim] Undefined variable in eval: (string expansion)

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Toralf Lund
Fecha:  
A: Exim Mailing List
Asunto: Re: [exim] Undefined variable in eval: (string expansion)

>
>>> What do I get if I do something like
>>>
>>> ${eval:$some_variable+1}
>>>
>>> when "some_variable" is not actually defined?
>>>
>> Looks like it treats some_variable as 0:
>>
>> root@clayman:~# /usr/sbin/exim -be
>> > ${eval:$acl_m9+1}
>> 1
>> >
>>
>
> Hmmm. More accurately, it expands to the empty string so your eval becomes:
>
> ${eval:+1}
>
> Which evaluates to 1
>

Ah, of course. It didn't occur to me just now that <nothing>+1 is a
valid expression as long as the value 1 may also be expressed as "+1".

Thanks.

- Toralf