Singleton: Difference between revisions

Content added Content deleted
No edit summary
Line 929: Line 929:
a singleton.
a singleton.
::attribute foo
::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>
</lang>