~ubuntu-branches/ubuntu/hardy/swig1.3/hardy

« back to all changes in this revision

Viewing changes to Examples/php4/class/runme.php4

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
# ----- Call some methods -----
37
37
 
 
38
# Notice how the Shape_area() and Shape_perimeter() functions really
 
39
# invoke the appropriate virtual method on each object.
38
40
print "\nHere are some properties of the shapes:\n";
39
41
foreach (array($c,$s) as $o) {
40
42
      print "    $o\n";
41
43
      print "        area      = " .  Shape_area($o) .  "\n";
42
44
      print "        perimeter = " .  Shape_perimeter($o) . "\n";
43
45
  }
44
 
# Notice how the Shape_area() and Shape_perimeter() functions really
45
 
# invoke the appropriate virtual method on each object.
46
46
 
47
47
# ----- Delete everything -----
48
48
 
49
49
print "\nGuess I'll clean up now\n";
50
50
 
51
51
# Note: this invokes the virtual destructor
52
 
delete_Shape($c);
53
 
delete_Shape($s);
 
52
#delete_Shape($c);
 
53
#delete_Shape($s);
 
54
$c = NULL;
 
55
$s = NULL;
 
56
 
 
57
# and don't forget the $o from the for loop above.  It still refers to
 
58
# the square.
 
59
$o = NULL;
54
60
 
55
61
print nshapes() . " shapes remain\n";
56
62
print "Goodbye\n";