define methods apart

spir denis.spir at gmail.com
Sat Dec 18 05:19:56 PST 2010


Hello,


I cannot find a way to define methods (I mean "member functions) outside the main type-definition body:

struct X {}
void X.say () {writeln("I say!");}
==>
Element.d(85): semicolon expected, not '.'

Do I overlook anything, or is this simply impossible? In the latter case, what is the problem?
(In many languages, not only dynamic ones, method are or at least can be defined apart.)


Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d-learn mailing list