Interesting..

Here's a quick test - the string length doubles each iteration. It was run on a server with 2G of RAM. Obviously it's more than 32767 bytes! My script ran out of RAM (and 100% CPU cycles!) when going from 512Meg to 1Gig string length. I suppose I could trap this and grow the string incrementally after 512Meg, but hey - it's a scripting language! Why would I need more than 512Meg long strings?? [Big Grin]
(actually, I started increasing the string length by 32K right after 512M, and only got one segment of 32K beyond the 512M point..)

Glenn

code:
 
String Length: 1
String Length: 2
String Length: 4
String Length: 8
String Length: 16
String Length: 32
String Length: 64
String Length: 128
String Length: 256
String Length: 512
String Length: 1024
String Length: 2048
String Length: 4096
String Length: 8192
String Length: 16384
String Length: 32768 <= exceeds spec in manual here
String Length: 65536
String Length: 131072
String Length: 262144
String Length: 524288
String Length: 1048576
String Length: 2097152
String Length: 4194304
String Length: 8388608
String Length: 16777216
String Length: 33554432
String Length: 67108864
String Length: 134217728
String Length: 268435456
String Length: 536870912

ERROR : out of memory!
Script: C:\temp\s.kix
Line : 11

It took about 2:36 to get to this point

Here's the script:
code:
 
Break On

Dim $L, $S
$L = 0.0
$S = 'X'

$L = Len($S)
'String Length: $L' ?

While @ERROR = 0
$S = $S + $S
$L = Len($S)
'String Length: $L' ?
Loop

_________________________
Actually I am a Rocket Scientist! \:D