Dear statalisters,
I just read this part of the manual.
I can understand the concept of calling a class into another class, such as that line
But I am particularly interested in the line
How can a class contain an argument ?
May you give me more detail about defining a class into another class as a function please ? I thought that a class cannot be defined with any argument...
Sorry if it has been explained anywhere else. I have not found any information on that.
I just read this part of the manual.
Code:
class U { real matrix M private real scalar type static real scalar count class coord scalar c real matrix inverse() protected real scalar type() class coord scalar c() }
Code:
class coord scalar c
Code:
clear mata mata: class test_into_test { string scalar world void new() } void test_into_test::new() { world = "world" } class test { string scalar hello void new() class test_into_test scalar c } void test::new() { hello = "hello" hello, c.world } end mata: a = test()
But I am particularly interested in the line
Code:
class coord scalar c()
May you give me more detail about defining a class into another class as a function please ? I thought that a class cannot be defined with any argument...
Sorry if it has been explained anywhere else. I have not found any information on that.
Comment