20,741
edits
Line 521: | Line 521: | ||
var p = new( Position3D ); | var p = new( Position3D ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This will simply create a function named "new" which accepts an implicit list of arguments (in the implicit "args" vector). The function returns a hash whose parents vector is set to the args vector. | |||
You could even implement an overloaded function that creates arrays of objects. | You could even implement an overloaded function that creates arrays of objects. |