version 1.138, 2005/05/11 17:57:52
|
version 1.139, 2005/07/26 12:50:29
|
Line 10757 You can define a class for graphical obj
|
Line 10757 You can define a class for graphical obj
|
@cindex @code{method} usage |
@cindex @code{method} usage |
@example |
@example |
object class graphical \ "object" is the parent class |
object class graphical \ "object" is the parent class |
method draw ( x y graphical -- ) |
method draw ( x y -- ) |
class; |
class; |
@end example |
@end example |
|
|
Line 10791 how:
|
Line 10791 how:
|
: draw ( x y -- ) |
: draw ( x y -- ) |
circle-radius @@ draw-circle ; |
circle-radius @@ draw-circle ; |
|
|
: init ( n-radius -- ( |
: init ( n-radius -- ) |
circle-radius ! ; |
circle-radius ! ; |
class; |
class; |
@end example |
@end example |