From 8bda0c3a5a3d408f989f5c530360a98c3601535b Mon Sep 17 00:00:00 2001 From: leto Date: Sun, 24 Feb 2008 22:23:25 +0000 Subject: [PATCH] more git-svn-id: file:///usr/local/svn/util/trunk@6 29942e26-f7dc-dc11-b955-0002b3153201 --- examples/typebound_overloading.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/typebound_overloading.pl b/examples/typebound_overloading.pl index 6ca0363..755bc55 100755 --- a/examples/typebound_overloading.pl +++ b/examples/typebound_overloading.pl @@ -7,10 +7,20 @@ use Math::MatrixReal; my $matrix = Math::MatrixReal->new_from_rows([[3,6,9]]); my $a = (2/3) * $matrix; my $b = 2 * $matrix / 3; +my $c = 2 * (+$matrix) / 3; +my $d = (2/3) * (+$matrix); + print "\$a is a " . (ref $a) . "\n"; print "\$b is a " . (ref $b) . "\n"; +print "\$c is a " . (ref $c) . "\n"; +print "\$d is a " . (ref $d) . "\n"; print "\$a=\n"; print $a; print "\$b=\n"; print $b; +print "\$c=\n"; +print $c; +print "\$d=\n"; +print $d; +