ArthurDent has asked for the wisdom of the Perl Monks concerning the following question:
And I've made a test script that looks like this:float Point_2D::x() CODE: RETVAL=THIS->x(); OUTPUT: RETVAL void Point_2D::set_x(arg) float arg CODE: THIS->x(arg); void Point_2D::DESTROY() CODE: delete THIS; Point_2D * Point_2D::new() CODE: RETVAL = new Point_2D(); OUTPUT: RETVAL
The output of which is:#!/usr/sbin/perl -w use ExtUtils::testlib; use Point_2D; my $pt; my $output; print "making object\n"; $pt = Point_2D::new(Point_2D); print "setting value\n"; Point_2D::set_x($pt,1.2); print "retrieving value\n"; $output = Point_2D::x($pt); print "output = ",$output;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perlxs and C++
by perlmonkey (Hermit) on May 17, 2000 at 11:53 UTC |