A java DEBUG flag

Cedric Berger cedric@wireless-networks.com
Wed Nov 29 11:37:00 GMT 2000


Sorry, I know what's wrong with my example. here is the right one:
class Debugging {
 static int openFilesCount;
 static boolean openFile() {
 return openFilesCount++ < LIMIT;
 }
 static boolean closeFile() {
 return openFilesCount-- > 0;
 }
}
class Main {
 void doSomething() {
 assert(Debugging.openFile());
 // do something
 assert(Debugging.closeFile());
 }
}


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /