[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tilde operator
"Loren J. Rittle" writes:
Is the following correct behavior under es?
S rittle@supra; echo <={~ x1 x*}
0
S rittle@supra; h=x*; echo <={~ x1 $h}
1
S rittle@supra; h=x1; echo <={~ x1 $h}
0
That looks reasonable to me. In the second example, "x*" was evaluated
once when you assigned to h, so it doesn't deserve to be evaluated again
when you do the tilde evalutation.
To get the "x*" evaluated again; use
h = x*; echo <={eval '~' x1 $h}
- References:
- tilde operator
- From: "Loren J. Rittle" <rittle@supra.rsch.comm.mot.com>