FAQ  •  Register  •  Login

Default Strings

<<

compiuter

Posts: 51

Joined: Mon May 10, 2010 10:47 pm

Post Mon Nov 05, 2012 10:07 am

Default Strings

I don´t know about the default strings, but old compilers had options to select string length, my question is about effect of retail length of strings. Example: DefaultShort=8 chars DefaultLong=32 chars.
What do you think of this?
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue Nov 06, 2012 3:02 pm

Re: Default Strings

compiuter wrote:I don´t know about the default strings, but old compilers had options to select string length, my question is about effect of retail length of strings. Example: DefaultShort=8 chars DefaultLong=32 chars.
What do you think of this?


String length here are dynamic. They only take 2 + LEN(string) bytes in memory. When a string grows (e.g. A$ = A$ + " "), the block is resized and/or reallocated. Then the string shortens (e.g. A$ = A$(2 TO) or the like). Nothing is done... unless the length decreased 4 or more bytes. In such case, the block is resized and/or reallocated and the memory freed.

Upon each block realloacation, the heap is defragmented.

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO