On Wed, Jan 11, 2012 at 10:38 PM, Luis Mochan <[email protected]> wrote:

> In the examples of Craig the argument of floor() is already a PDL, but the
> confusion arises when floor is applied to a perl scalar. If I take another
> common function, say cos() and apply it to a perl scalar I get a perl
> scalar, and if I apply it to a PDL I get a PDL. Isn't that less surprising
> than floor() making conversions?
> Best regards,
> Luis
>

But this happens because cos() is a built-in whereas floor is not.
Probably, Chris should have use int(), which is a Perl built-in that is not
overloaded by Perl. I would have mentioned that earlier, but it didn't
occur to me.

David
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to