38 lines
916 B
Text
38 lines
916 B
Text
Module CheckGroupRef {
|
|
Group TestMe {
|
|
Private:
|
|
acc=1
|
|
Public:
|
|
Function GetAcc {=.acc}
|
|
Group Y {
|
|
Property Name$ {Value}="TestMe"
|
|
Value {
|
|
link parent [x] to x
|
|
=100*x
|
|
}
|
|
Set {
|
|
read x
|
|
Link parent acc to acc
|
|
acc+=x
|
|
}
|
|
}
|
|
Property X { Value }=100
|
|
Function GetValue(x) {
|
|
=.[X]*x
|
|
.[X]++
|
|
}
|
|
}
|
|
|
|
Module GetIt (&Fun()) {
|
|
Print Fun(30)
|
|
}
|
|
GetIt &TestMe.GetValue() ' 3000
|
|
Print TestMe.X=101
|
|
Module ByRef (&What){
|
|
Print What, What.Name$
|
|
What=30
|
|
}
|
|
ByRef &TestMe.Y
|
|
Print TestMe.GetAcc()=31
|
|
}
|
|
CheckGroupRef
|