Hi Ed,

> Instead, it claims to have been "by design", without explaining what
benefit this supposed design decision adds. 

What about getting reasonable speed with the report writer and low memory
consumption? 

VFP and FoxPro use two types of strings internally for data structures: One
string is a pascal like string and limited to 256 characters, the other one
is more like a memo field and flexible in length. Whenever possible, VFP
uses the short string which needs less memory, doesn't require handle
locking and is faster in processing. For instance:

ox = CreateObject("Listbox")
ox.RowSource = Replicate("1234567890",30)
? Len(ox.RowSource)

Will print 256 instead of 300 in VFP 9. Fields loaded into memory, native
properties, and report expressions are all among the ones that use 256
characters internally. Memo fields, string variables and custom properties
use the long version.

The limitation is a design decision, but one that was made 25 years ago when
using 16 bits for the string length for internal values meant more than just
wasting a byte. For instance, with 256 character limited strings you had a
minimum number of strings that would fit into one segment (remember segments
from 16 bit Assembler or C programming)? Thereby you could optimize a lot of
code that would operate on a set of such strings such as a record. With 16
bit string length you suddenly had to change segments every time you access
a field.

VFP 3 was the last time they could have revised this decision. However, keep
in mind that VFP 3 was compatible with Windows 3.1, already slow and a
resource hog. Even in 1992 memory consumptions and performance where
important design factors. Making VFP 3 even slower wasn't Microsoft's
intention back then.

-- 
Christof



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to