No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- interface Printable
- method print()
- end interface
-
- interface Resettable
- method reset()
- method active() as boolean
- end interface
-
- class Counter implements Printable, Resettable
- private word value
- private byte[4] history
-
- public method init(start as word)
- var copy as word
- copy = start
- self.value = copy
- self.history[0] = 0
- end method
-
- public method destroy()
- self.value = 0
- return
- end method
-
- public method print()
- print self.value
- end method
-
- public method reset()
- self.value = 0
- end method
-
- public method active() as boolean
- if self.value <> 0
- return true
- else
- return false
- end if
- end method
- end class
-
- program Main
- var count as Counter
- var output as Printable
- count = new Counter(10)
- output = count
- output.print()
- delete output
- end program
|