File: prog_mod3.ppl

package info (click to toggle)
pyxplot 0.9.2-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,288 kB
  • sloc: ansic: 50,373; xml: 1,339; python: 570; sh: 318; makefile: 89
file content (12 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
animal = module()
animal.info() = "I am a %s."%self.type
animal.moreInfo() = "My name is %s."%self.name
cat = animal()
cat.type = "cat"
subroutine cat.poke() { print "miaox!" ; }
cat.moreInfo() = "My name is %s."%self.name
tiddles = cat()
tiddles.name = "tiddles"
print tiddles.info()
print tiddles.moreInfo()
call tiddles.poke()