[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2005-09-18T23:48:50-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/1015 2005-09-18T23:48:50-05:00 2005-09-18T23:48:50-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7568#p7568 <![CDATA[Speed problems]]> make red a floating point instead of a LONG.
and subtract 86400 instead of 86399

Regards,
Michael

Statistics: Posted by Michael Calkins — Sun Sep 18, 2005 11:48 pm


]]>
2005-09-17T12:47:02-05:00 2005-09-17T12:47:02-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7498#p7498 <![CDATA[Speed problems]]> This has the fix included:

Code:

'PQBC - Inkey$ Wait '--------- do a=a+1 red& = timer + (how ever long suits your program as a delay) WHILE RED& > TIMER OR key$ <> "" IF TIMER < 2 THENLET RED& = RED& - 86399END IFkey$=inkey$ WEND if a = 100000 then gosub finalselection loop while key$="" 
This should work. Just make sure not to start your program at 12:00:01 AM :P

Statistics: Posted by Patz QuickBASIC Creations — Sat Sep 17, 2005 12:47 pm


]]>
2005-09-17T12:22:13-05:00 2005-09-17T12:22:13-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7496#p7496 <![CDATA[Speed problems]]> *****

Statistics: Posted by moneo — Sat Sep 17, 2005 12:22 pm


]]>
2005-09-17T09:30:17-05:00 2005-09-17T09:30:17-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7489#p7489 <![CDATA[Speed problems]]>
i don't want to speed it up, i want to replace a=a+1 with something that will work indepent of the speed of the cpu
Try this... Using the TIMER function will do this.

Code:

'PQBC - Inkey$ Wait'---------do a=a+1 red& = timer + (how ever long suits your program as a delay)WHILE RED& > TIMER OR key$ <> ""key$=inkey$WENDif a = 100000 then gosub finalselectionloop while key$="" 
Although with this, you may want to change your "if a = 100000 then gosub finalselection" to something shorter or the program will take forever to run.

Statistics: Posted by Patz QuickBASIC Creations — Sat Sep 17, 2005 9:30 am


]]>
2005-09-17T02:24:33-05:00 2005-09-17T02:24:33-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7486#p7486 <![CDATA[Speed problems]]> Statistics: Posted by RayBritton — Sat Sep 17, 2005 2:24 am


]]>
2005-09-16T23:10:50-05:00 2005-09-16T23:10:50-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7482#p7482 <![CDATA[Speed problems]]> Regards,
Michael

Statistics: Posted by Michael Calkins — Fri Sep 16, 2005 11:10 pm


]]>
2005-09-16T23:05:27-05:00 2005-09-16T23:05:27-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7480#p7480 <![CDATA[Speed problems]]> I stand corrected --- thanks.
*****

Statistics: Posted by moneo — Fri Sep 16, 2005 11:05 pm


]]>
2005-09-16T22:16:37-05:00 2005-09-16T22:16:37-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7477#p7477 <![CDATA[Speed problems]]>
* In order to count up to 100,000, the variable "a" must be either SINGLE or DOUBLE, by default or explicitly defined.
You are forgetting LONGs.
a isn't declared as a specfic varible i just typed
a=0
Please put

Code:

DIM a AS LONG
before you use the variable a. Otherwise, the variable is probably a SINGLE, which is a 32 bit floating point number. LONG is a 32 bit integer number, and should be much faster and much more efficient. That alone should speed your program up.
no i compile the program because other might not have qb
Anyone can freely and legally download the QBASIC Interpreter (version 1.1) from:
ftp://ftp.microsoft.com/Products/Window ... olddos.exe
Regards,
Michael

Statistics: Posted by Michael Calkins — Fri Sep 16, 2005 10:16 pm


]]>
2005-09-16T11:00:40-05:00 2005-09-16T11:00:40-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7437#p7437 <![CDATA[Speed problems]]> Statistics: Posted by RayBritton — Fri Sep 16, 2005 11:00 am


]]>
2005-09-16T01:10:11-05:00 2005-09-16T01:10:11-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7419#p7419 <![CDATA[Speed problems]]> Statistics: Posted by RayBritton — Fri Sep 16, 2005 1:10 am


]]>
2005-09-15T16:41:34-05:00 2005-09-15T16:41:34-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7409#p7409 <![CDATA[Speed problems]]>
rights the correct code
a isn't declared as a specfic varible i just typed
a=0

Code:

doa=a+1key$=inkey$if a = 100000 then goto finalselection elseloop while key$=""
the a=0 isn't anywhere near is bit of code

1.4Ghz isn't my machine is a customer(ish)'s machine

i'm using
* Operating system - Windows 98SE
* Language version - QB7.1
* Running interpreted or compiled -- sorry i didn't understand this one
Fine, then assuming you have a label elsewhere in the program called "finalselection", this code should work.

Just a suggestion, the following line of code:
if a = 100000 then goto finalselection else
is valid and works, but in my opinion is poor programming practice. Remove the "else", it doesn't do anything and adds confusion.

When you work with QB, you have the option of running the program in interpretive mode (which is probably what you use), or you can request QB to compile the program and produce an executable file, a .exe file. You can give this .exe file to someone else and he can run your program without having to have QB.
*****

Statistics: Posted by moneo — Thu Sep 15, 2005 4:41 pm


]]>
2005-09-15T15:02:54-05:00 2005-09-15T15:02:54-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7402#p7402 <![CDATA[Speed problems]]> a isn't declared as a specfic varible i just typed
a=0

Code:

doa=a+1key$=inkey$if a = 100000 then goto finalselection elseloop while key$=""
the a=0 isn't anywhere near is bit of code

1.4Ghz isn't my machine is a customer(ish)'s machine

i'm using
* Operating system - Windows 98SE
* Language version - QB7.1
* Running interpreted or compiled -- sorry i didn't understand this one

Statistics: Posted by RayBritton — Thu Sep 15, 2005 3:02 pm


]]>
2005-09-15T13:51:13-05:00 2005-09-15T13:51:13-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7398#p7398 <![CDATA[Speed problems]]> * In order to count up to 100,000, the variable "a" must be either SINGLE or DOUBLE, by default or explicitly defined.

* The variable "a" must be initialized to zero before entering the DO loop.

* The statement "if a = 100000" is incomplete and invalid.

* The way your code is written, assuming the invalid statement allows it to run, the program will sit and wait for a character before exiting the DO loop. Therefore, the speed of the human hitting the key will determine how long the DO loop runs.

When you fix the code, there are other factors which will influence the speed besides the clock speed of the machines:
* Operating system (Native DOS or Windows)
* Language version (GWBasic, Basica, QuickBasic, QBasic)
* Running interpreted or compiled

SUGGESTION: It's ok to use your old 133mhz machine for testing, but if your 1.4ghz machine is where you want the final program to run, then do performance testing on the new machine and forget about it on the old machine, whether it was better or worse.
*****

Statistics: Posted by moneo — Thu Sep 15, 2005 1:51 pm


]]>
2005-09-15T10:58:29-05:00 2005-09-15T10:58:29-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7394#p7394 <![CDATA[Speed problems]]> Statistics: Posted by RayBritton — Thu Sep 15, 2005 10:58 am


]]>
2005-09-15T06:34:25-05:00 2005-09-15T06:34:25-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=7383#p7383 <![CDATA[Speed problems]]>
There is a way around it but it takes the RealTime Clock... kinda hard to explain... and too much code anyway...

Wait for the other experts...

grtz
Seb

Statistics: Posted by Guest — Thu Sep 15, 2005 6:34 am


]]>