Original date:2021-02-23 12:55:42 Edited by: petelomax Subject: Class/Interface/Contract Re: fake class in OE

[quote mitgedanken] : But I prefer

class_pointer goat_ = class:new("Goat") 
method_return goat_name = class:method(goat_, "get_name", {}) 
or class:call(...) or class:func(..) / class:proc(...) </eucode> [/quote]

Erm, this currently works in Phix

class Goat 
    string name 
    function get_name() 
        return name 
    end function 
end class 
Goat goat = new({"Gertrude"}) 

Note that works the same as goat.get_name() here, because it recognises the "get_" part.

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu