repo.or.cz
/
vox.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fixed newslot in table.cpp, that would return false, even though the slot was correct...
[vox.git]
/
examples
/
prototypes.vx
blob
ddb647cb07cf43a52317c2627e27389a62f40b60
1
2
class Foo
3
{
4
name = null
5
constructor(_name)
6
{
7
this.name = _name
8
}
9
}
10
11
Foo.print_name := function()
12
{
13
println("this.name = ", this.name)
14
}
15
16
Foo.set_name := function(newname)
17
{
18
this.name = newname
19
}
20
21
f := Foo("world")
22
f.print_name()
23
f.set_name("Buddha")
24
f.print_name()