Hi,
I want to declare an array which should contain more than 50,000 records. Can you tell us the declaration type which should be used for this condition. We tried using ‘long’ but it ended in overflow error message.
please help!!!
Chella
Hi,
I want to declare an array which should contain more than 50,000 records. Can you tell us the declaration type which should be used for this condition. We tried using ‘long’ but it ended in overflow error message.
please help!!!
Chella
Subject: Overflow
You can also try using a fixed length record file, this would allow for almost limitless boundaries, today’s HD speeds are pretty good to handle these kind of tasks.
Subject: Overflow
both array and list may contain max 32768 elements.So, think about string with separator
dim strArr as string
dim strEl as string
dim sep as string
dim nEl as long
sep = “|”
for i = 0 to 50000
if strArr = “” then
strArr = "test" & cstr(i)
else
strArr = strArr & sep & "test" & cstr(i)
end if
next
nEl = 546
strEl = strToken(strArr, sep, nEl)
Subject: RE: Overflow
IIRC Strings in Lotusscript are “immutable” unless they have a defiend length.
This means that any concatenation operation requires the string to be copied in memory to a new location. If you do that 50.000 times, it will be very inefficient at the least.
For these kind of things, the originating poster should use a different way, e.g.: implementing an ArrayList/Vector substitute for the equivalent Java class.
cheers,
Bram
Subject: RE: Overflow
as for "inefficient"for concatenation he can use rtitem (appen and then getunformattedtext) → it will be much faster.