September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,25 +1,25 @@
|
|||
import extensions.
|
||||
import extensions;
|
||||
|
||||
class Extender :: BaseExtender
|
||||
class Extender : BaseExtender
|
||||
{
|
||||
object prop foo :: theField.
|
||||
prop object foo;
|
||||
|
||||
constructor new : anObject
|
||||
[
|
||||
theObject := anObject.
|
||||
]
|
||||
constructor(object)
|
||||
{
|
||||
theObject := object
|
||||
}
|
||||
}
|
||||
|
||||
public program
|
||||
[
|
||||
var anObject := 234.
|
||||
public program()
|
||||
{
|
||||
var object := 234;
|
||||
|
||||
// extending an object with a field
|
||||
anObject := Extender new(anObject).
|
||||
object := new Extender(object);
|
||||
|
||||
anObject foo := "bar".
|
||||
object.foo := "bar";
|
||||
|
||||
console printLine(anObject,".foo=",anObject foo).
|
||||
console.printLine(object,".foo=",object.foo);
|
||||
|
||||
console readChar
|
||||
]
|
||||
console.readChar()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue