× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



rob@xxxxxxxxx wrote:
I don't quite understand your question.

Are you saying:
If #TEXT is 55 characters and parm1(p) is 10, and is not blank, then you want to do something like:
#text = %trim(#text) + ', ' + %trim(parm1(p)); /* with some additional logic for when #text approaches 55 characters, etc */


By the way, you may want to consider dropping the Do loop and using a FOR loop.

for p = 1 to 100;
  parm1(p)....
EndFor;

Rob Berendt

And don't forget the boundary condition at the beginning when #TEXT is empty. You probably don't want it to start with a comma.


Best to use character varying format for these types of string operations. Define a 2A VARYING separator string variable initialized to '' at the beginning, then set the separator to ', ' after appending each piece.

Regarding the 55 character chunks, I'd build up the whole text string first, then split at blanks to produce a set of <=55 character pieces.

Cheers! Hans



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.