O.K., at the start of the program, I added
DEFINT I,J
Then, I had to change it, since the first value, 100000 was greater than the largest integer that QB allows, 32,000+. The new program is:
Code:
DEFINT I-J
CLS
starts = TIMER*1000
FOR i = 1 TO 10000
FOR j = 1 TO 30000
NEXT j
NEXT i
stops = TIMER*1000
PRINT stops - starts
WHILE INKEY$ = "": WEND
I ran it in QB, getting 3.3 secs
In fb, it gave 0.98 secs, or, approximatel, 3.4 times faster than QB.
By the way, Antoni, I ran both programs in windows and in full screens, with no difference in the times. And, from what RyanKelly said above, I am not sure that, other than getting a relative time between whatever, I am not getting a proper, real time for the actual program run. However, when the program is running, I do a mental count of seconds, up to as many as 30 or so, and my manual count checks with the printout time from the program.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.