>lcString = REPLICATE("1234567890",1500000) >lcString = lcString + REPLICATE("1234567890",1000000) >? LEN(lcString) >That gets you to 25MB. Try this:
CLEAR lcString = "" FOR lnIx = 1 TO 22 STEP 1 * 22x max increment length is most iterations on my system without C5ing VFP lcString = lcString + SPACE( 2^24 - 32 ) && largest acceptable increment, anything larger yields an error ? LTRIM( STR( lnIx ) ) + "x Max Increments, Total Length " + LTRIM( STR( LEN( lcString ) ) ) ENDFOR * At this point total length is 369,098,048 * If we try to add one more max increment ( 2^24 - 32 ) VFP will crash with a C5 * If successful it would bring the length up to ~ 386,000,000 * But, if we start using smaller increments we can get much farther * Now go fewer bytes at a time until VFP crashes: FOR lnIx = 1 TO 100000000 STEP 1 lcString = lcString + SPACE( 2^23 ) && secondary increment ?LEN( lcString ) && Program finally halts here with not enough memory to run the LEN( ), not a VFP C5 ENDFOR * Largest values reported with different secondary increments: * 2^23: 377,486,656 * 2^22: 490,732,864 * 2^21: 492,830,016 * 2^20: 493,878,592 * 2^19: 492,830,016 * So there's definitely some funky stuff going on * when pushing string variables past 16MB