Singleton: Difference between revisions
→{{header|OxygenBasic}}
Puppydrum64 (talk | contribs) mNo edit summary |
|||
Line 1,644:
=={{header|OxygenBasic}}==
<lang oxygenbasic>
Class Singleton
static sys inst
int instantiated() { return inst }
void constructor(){ if not inst then inst=@this }
'all other methods start with @this=inst
end class
'if not singleton.instantiated
new Singleton MySingleton
'endif
</lang>▼
▲</lang>
=={{header|Oz}}==
|