|
>> Varying fields may not cause a big cycle doing %len, but what about what goes on when it's keeping track of the length of that string as it changes? It is generally much more efficient there as well. Consider building an HTML string in a loop (Table subfile type thing). Within the loop you are going to be doing an HTMLString = %TrimR(HTMLString) + Newstuff Consider what happens here. We start by working out how many blanks there are at the end of the current string (i.e. a CHECKR), then we start to copy the new data in. Next time though the loop we do it over again. Given that we are often using a string of about 32K or so this can be a pretty slow process. Using a variable length field on the other hand we would do HTMLString = HTMLString + %TrimR(Newstuff) This time we calculate how many characters to move form the source field and simply start moving it to the target field using the current length of the target field + 1 to supply the offset. The bigger the field, the bigger the difference in speed. PS. Brad - disagreeing with you doesn't constitute nit-picking. It just means I disagree with you! Jon Paris Partner400
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.