Vincent Foley wrote: > On Sun, Apr 21, 2002 at 06:27:04AM +0900, Michael Brailsford wrote: > >>The other idea is to provide a predefined entry point for classes. >>Something akin to C++ "int main()" or Java's "public static void >>main(String[] args)". If this predefined entry point existed in a class >>in the script then after the file has been read the interpreter would >>run the class using that predefined method. If it didn't exist then >>behavior would be what it is now. > > ---end quoted text--- > > My english is not too good, but are you wanting something like: > > if $0 == __FILE__ then > main > end > > ? > That is what I thought the poster was talking about as well. I personally like the Ruby idiom better. A C-like global "main" method seems too much like a special case, as does a "main" class method. This was always something I though was rather crappy about C. I don't like the idea of the name of a function or method having a special significance. Heath -- Heath Holcomb bluetea / nc.rr.com