[1123] in java-interest
Re: java-interest-digest V1 #120
daemon@ATHENA.MIT.EDU (Michael the Bearded)
Sat Aug 19 15:52:51 1995
Date: Sat, 19 Aug 1995 12:25:37 -0400
To: owner-java-interest@java.sun.com, java-interest@java.sun.com
In-Reply-To: Jim Carroll's message of Fri, 18 Aug 95 14:10:03 EDT
From: mcampbel@schubert.sbi.com (Michael the Bearded)
Reply-To: mcampbel@schubert.sbi.com
In article <199508181810.OAA10310@apollo.carroll.com> Jim Carroll <jim@carroll.com> writes:
> > MyFrame=new Frame (MyWServer,true,false,null,300,300,Color.gray);
> > MyFrame.setTitle ("Graphics Test Frame");
> >
> > MyWindow=new Window ( MyFrame,"Center",Color.white,200,200);
> >
> > MyGraphics = new Graphics (MyWindow);
> > MyFrame.map ();
> > for (int c=1;c++<1000;); //wait till frame is setup
>
> I am just coming onboard to Java programming, and have been quietly reading
> the posts. I saw the above piece of code, and stopped dead in my tracks.
>
> What is the purpose of this:
>
> > for (int c=1;c++<1000;); //wait till frame is setup
>
> How can you know how long it takes to loop 1000 times in an architecture
> independant environment?
Exactly.
And couldn't future versions of the compiler optimize this out completely?
+-----------------------------------------------------------------------------+
| Michael Campbell - mcampbel@offenbach.sbi.com :: I speak only for myself :: |
| Fools! I'll destroy them all! |
+-----------------------------------------------------------------------------+
| "The soft-minded man always fears change. He feels security in the status |
| quo, and he has an almost morbid fear of the new. For him, the greatest |
| pain is the pain of a new idea." - Rev. Dr. Martin Luther King Jr. |
+-----------------------------------------------------------------------------+
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com