Singleton: Difference between revisions

362 bytes added ,  11 years ago
No edit summary
Line 929:
a singleton.
::attribute foo
</lang>
 
=={{header|OxygenBasic}}==
The singleton contains static members only. It may be instantiated any number of times, but the members will all be shared.
<lang oxygenbasic>
class singleton
static sys a,b,c
static string s,t,u
static double x,y,z
end class
 
'TEST
'====
 
singleton A
singleton B
A.c=3
print B.c 'result 3
print sizeof B 'result 0
</lang>
 
Anonymous user