| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | VB strings |
Hi Bob, BL> I found something interesting about VB. It allows a BL> maximum 32K for strings, but what they don't say is that each module BL> is only allowed 64K string memory. Yes they do. I think is is somewhere in the back of the book. BL> In rep2pkt, I was reading 32K of the packet into buf$, and then BL> reading the message out of that as msg$. It's a lot faster that way, BL> rather than try to find the message directly from the file. okay. BL> What I ended up with was two big strings (buf$ and msg$), and when I BL> processed msg$ later, I just ran out of memory. To cure it, all I had BL> to do was put buf$ = "" once I had read msg$, and release the 32K BL> it was using. Yeah. BL> God, the book is useless! I read it 47 different ways, and I don't BL> think the guy who wrote it realises that this is all you have to do. What book ? BL> Is this a common trick, or is it unique to VB? It depends on how the product allocates it's memory. VB is dynamic and hence your buf$ = "" effectively frees the memory. Some products are static and therefor using your buf$ = "" will simply fill the buffer with ASCII spaces or place a NUL character in the first cell. Regards, Brenton @EOT: ---* Origin: TestPoint (3:711/934.7) SEEN-BY: 711/934 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.