Hi Ingo,
On Mon, Mar 08, 2021 at 09:49:06AM +0100, Ingo Schmid wrote:
> ...
> is it not doing  ci() + $x (expected behaviour) rather than ci( +$x) ?

No. For example:
    $ pdl2
    ...
    pdl> $x=1+0*ci # initialize a complex variable with a real value
    pdl> p $x
    1+0i
    pdl> p ci()+$x # this works as expected
    1+1i
    pdl> p ci+$x # this doesn't

    pdl> p $x # and the value of $x has been changed
    0+1i

Curiously,
    pdl> p ci-$x
doesn't print anything either, but it doesn't change $x (I guess -$x
is assigned to a temporary variable and that is what gets modified by
ci; in ci+$x a temporary variable is not necessary so $x itself gets
modified).

Regards,
Luis

--

                                                                  o
W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
Av. Universidad s/n CP 62210         |                           (*)/\/  \
Cuernavaca, Morelos, México          | [email protected]   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB


_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to