|
I have been testing the new %Trim second parameter featured in V5R4. I have an application where I could trim stray period characters. The example I was given from another programmer who uses this is blanks, `/` and `\`. I wrote a test program and coded this:
// Trim To Remove The Listed Characters
TRIMOUT = %Trim(TRIMIN :' .\/'); // Trim Blank, Period, Slashes
I keyed some test data into a file and this was the result:
12 45\67/ 12 45\67 removed the trailing '/'
1/1\2 1/1\2 removed nothing
112 33\44\ 112 33\44 removed trailing '\'
///\1234.56 1234.56 removed all slashes
987.654 987.654 removed nothing
Something is working part of the time. I have been unable to locate an example other than what was listed in the official announcement:
Second parameter for %TRIM, %TRIMR and %TRIML indicating what characters to trim:
%TRIM is enhanced to allow an optional second parameter giving the list of characters to be trimmed.
This mailing list archive is Copyright 1997-2026 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.