PowerBASIC Peer Support Forums
 

Go Back   PowerBASIC Peer Support Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.08 seconds.
Search: Posts Made By: Mike Doty
Forum: Programming Jan 24th, 2015, 12:40 PM
Replies: 28
Views: 522
Posted By Mike Doty
My tests show if you request more than 1 register...

My tests show if you request more than 1 register you may not get any optimization. Please prove me wrong.

'#DIM All 'intentionally not used so local statements are not needed
%Max = 9999999...
Forum: Programming Jan 22nd, 2015, 11:32 PM
Replies: 28
Views: 522
Posted By Mike Doty
#DIM ALL FUNCTION PBMAIN () AS LONG ...

#DIM ALL

FUNCTION PBMAIN () AS LONG
REGISTER v AS LONG
LOCAL p AS LONG PTR
v = 5
p = VARPTR(v)'invalid register variable detected by compiler
p = Test(v)
? STR$(@p) '5
END...
Forum: Programming Jan 22nd, 2015, 11:02 PM
Replies: 28
Views: 522
Posted By Mike Doty
v = 5 p = Test( v ) 'returns varptr(5) ?...

v = 5
p = Test( v ) 'returns varptr(5)
? STR$(@p)' 'returns 5


FUNCTION PBMAIN () AS LONG
LOCAL v AS LONG
LOCAL p AS LONG PTR
v = 5
p = Test( v )
Forum: Source Code Jan 19th, 2015, 03:43 AM
Replies: 2
Views: 759
Posted By Mike Doty
It quit working, got it to work again by: ...

It quit working, got it to work again by:
Click: Start
Type: Assoc
Click: Change the file type associated with a file extension (should appear at top of list, will take you to Set Associations)...
Forum: Programming the Internet Jan 14th, 2015, 02:34 PM
Replies: 7
Views: 419
Posted By Mike Doty
Download string created with StringBuilder ...

Download string created with StringBuilder
String concatenation could be extensive with sData = sData + sBuffer


%BytesWantedPerRECV = 32 * 4096

FUNCTION PBMAIN () AS LONG 'sb.bas

...
Forum: PowerBASIC for Windows Jan 13th, 2015, 06:57 PM
Replies: 35
Views: 702
Posted By Mike Doty
There is direct access to the string builder...

There is direct access to the string builder buffer at any position all the time.
STATIC variable was mentioned. Here is a demo with a GLOBAL.
Multiple string builder buffers could be used if...
Forum: PowerBASIC for Windows Jan 13th, 2015, 05:09 PM
Replies: 35
Views: 702
Posted By Mike Doty
Post #12 seems to use about everything in...

Post #12 seems to use about everything in StringBuilder

http://www.powerbasic.com/support/pbforums/showthread.php?t=55093
Forum: Programming the Internet Jan 13th, 2015, 04:45 PM
Replies: 7
Views: 419
Posted By Mike Doty
The length of buffer after TCP RECV is the number...

The length of buffer after TCP RECV is the number of bytes received.

'
FUNCTION PBMAIN () AS LONG
LOCAL sData,Buffer,file, site AS STRING
LOCAL portnumber, h AS LONG
Site = ""
file =...
Forum: PowerBASIC for Windows Jan 13th, 2015, 04:08 PM
Replies: 35
Views: 702
Posted By Mike Doty
It is an object

StringBuilder Methods/Properties
ADD (PowerString$) Method<1>
The PowerString$ parameter is appended to the string held in the StringBuilder object. If the internal string buffer overflows,...
Forum: PowerBASIC for Windows Jan 13th, 2015, 03:30 PM
Replies: 35
Views: 702
Posted By Mike Doty
StringBuilder supports static, global and...

StringBuilder supports static, global and inserting at any position.
Change normal test and I'll change the stringbuilder test.
Forum: PowerBASIC for Windows Jan 13th, 2015, 03:16 PM
Replies: 35
Views: 702
Posted By Mike Doty
Michael, I agree. The normal test just builds...

Michael,
I agree.
The normal test just builds a string 10,000 times and if the original
string is modified and something is added on it should be shown so
we can do the same thing in the...
Forum: PowerBASIC for Windows Jan 13th, 2015, 03:12 PM
Replies: 35
Views: 702
Posted By Mike Doty
Jim, They are not the same tests. If you are...

Jim,
They are not the same tests.
If you are doing something different in the normal test, please show it
so we can change the StringBuilder test to match it.

1) Normal test adds sTxt...
Forum: PowerBASIC for Windows Jan 13th, 2015, 02:38 PM
Replies: 35
Views: 702
Posted By Mike Doty
Your normal test only did this: ''normal ...

Your normal test only did this:

''normal
tix tcount&&
for i&=1 to 10000
t$=t$+stxt$
next i&
tix end tcount&&
Forum: PowerBASIC for Windows Jan 13th, 2015, 02:23 PM
Replies: 35
Views: 702
Posted By Mike Doty
First a StringBuilder test that shows the huge...

First a StringBuilder test that shows the huge difference.


#DIM ALL
%Loops = 10000

FUNCTION PBMAIN
LOCAL sTxt,t,t1,sText AS STRING
LOCAL tcount,tcount1 AS QUAD
LOCAL i AS LONG
Forum: PowerBASIC for Windows Jan 13th, 2015, 01:37 PM
Replies: 35
Views: 702
Posted By Mike Doty
> Stringbuilder does not cut it because I'm not...

> Stringbuilder does not cut it because I'm not adding the strings all at once.
This is inaccurate. StringBuilder is excellent for repeated additions.
It should be many times faster than a$ = a$ +...
Forum: Programming the Internet Jan 13th, 2015, 12:19 PM
Replies: 7
Views: 419
Posted By Mike Doty
I believe the safe refers to the fact that you...

I believe the safe refers to the fact that you already know the
number of bytes that should be received and you can test
against that value. Some download routines download, but
do not have a...
Forum: Programming the Internet Jan 13th, 2015, 11:48 AM
Replies: 7
Views: 419
Posted By Mike Doty
I use TcpSafeReceive by Don Dickinson all the...

I use TcpSafeReceive by Don Dickinson all the time.
Added a progress bar.

It never returns more than recBuff

IF LEN(recBuff) >= iBufferLen THEN
EXIT DO
END IF
Forum: Cafe PowerBASIC Jan 13th, 2015, 11:35 AM
Replies: 16
Views: 1,399
Posted By Mike Doty
Any suggestions on files to move to ram disk? ...

Any suggestions on files to move to ram disk?

Did NOT change system environment variables (installs may need them)

Changes so far from SSD to Ram disk:
1) pbwin10
2) internet explorer
3)...
Forum: PowerBASIC for Windows Jan 11th, 2015, 12:28 PM
Replies: 37
Views: 1,546
Posted By Mike Doty
Thank you for the excellent code and I'll use it...

Thank you for the excellent code and I'll use it "as is" with the globals.
Forum: PowerBASIC for Windows Jan 10th, 2015, 11:21 PM
Replies: 37
Views: 1,546
Posted By Mike Doty
Not sure how to handle it. Error checking is...

Not sure how to handle it. Error checking is needed.
Report error or continue on error. GPF is not an option.
I caught the input line in your code using ON ERROR GOTO.

My parser removed the...
Forum: PowerBASIC for Windows Jan 10th, 2015, 05:20 PM
Replies: 37
Views: 1,546
Posted By Mike Doty
Inch abbreviation is not a delimiter

Gary,
This demonstrates the problem in LoadFileNameToD

"First","Last","Comment"
"Heidi","Klum","idp 3525 citizen printer $230.00 3" on center holes"
Forum: PowerBASIC for Windows Jan 10th, 2015, 03:01 PM
Replies: 37
Views: 1,546
Posted By Mike Doty
Gary, Yes, I will get a CSV file to you. ...

Gary,
Yes, I will get a CSV file to you.

This is some code just using the sort in the John Petty include file.
Modifying code so it doesn't need GLOBALS.
Quick fix was using THREADED.
Still...
Forum: PowerBASIC for Windows Jan 10th, 2015, 02:37 AM
Replies: 37
Views: 1,546
Posted By Mike Doty
> 'this is a modification of a sort posted by...

> 'this is a modification of a sort posted by Steve Hutchison in the include file.

Any idea if this is the version with the John Petty sort?
It still GPF's on my CSV files (which I will track...
Forum: PowerBASIC for Windows Jan 10th, 2015, 02:25 AM
Replies: 37
Views: 1,546
Posted By Mike Doty
Thanks, Gary! The second and third links are...

Thanks, Gary!
The second and third links are broken.
I'll try the last one. Really interested in seeing the John Petty sort.

I see you updated the links!
Downloading the 310 version, thank...
Forum: PowerBASIC for Windows Jan 10th, 2015, 12:33 AM
Replies: 37
Views: 1,546
Posted By Mike Doty
Gary, Do you have a link to the source? ...

Gary,
Do you have a link to the source?
Would really like to see this version.

This version allows multiple-column sorting of 2D string arrays,

This link is broken:...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 04:26 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1999-2011 PowerBASIC, Inc. All Rights Reserved.
Error in my_thread_global_end(): 1 threads didn't exit