Topic: static objects/classes?
Author: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Date: Wed, 8 Feb 1995 20:15:56 GMT Raw View
milor001@maroon.tc.umn.edu (R A Milowski) writes:
>static class Something {
>// blah blah blah
>// interface code there...
>};
[...]
>What is the "static" on the class definition suppose to mean?
I guess the programmer intended it mean "this class is only used in
this file". However, it doesn't have any semantic effect - its only
potential use is as documentation.
--
Fergus Henderson - fjh@munta.cs.mu.oz.au
all [L] (programming_language(L), L \= "Mercury") => better("Mercury", L) ;-)
Author: milor001@maroon.tc.umn.edu (R A Milowski)
Date: Mon, 6 Feb 1995 03:47:19 GMT Raw View
I ran into the following code (and problem) when I tried to compile
Fresco:
static class Something {
// blah blah blah
// interface code there...
};
static Something something;
Since the class definition was in the code (.cxx file) and not in the header,
I am assuming that the intension was for a locally scoped class definition.
Its use--as a static object instance--also sugests this.
What is the "static" on the class definition suppose to mean? Is this something
new? I was paging through Stroustrup's book but couldn't find it.
Comments?
R. Alexander Milowski