× 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.



Not necessarily. With a VARYING field, spaces are counted as part of the
length. If I have the following:
D somefield s 20a inz varying
C eval somefield = 'Hello '
C eval somefield = somefield + 'there'

Somefield now contains "Hello there". In reality, somefield is 22 bytes in
size, the first two bytes indicate the length, and the rest (the 20 you
allocated) are the data. I would think of it more as a %subst() than a
%trim() due to the above.

In your examples, the embedded spaces will remain. When you use varying
fields and want to ensure there are no trailing blanks, you still use
%trim().

HTH,
Loyd

-----Original Message-----
From: Fisher, Don [mailto:Dfisher@roomstoreeast.com]
Sent: Thursday, August 29, 2002 1:15 PM
To: 'midrange-l@midrange.com'
Subject: RE: Justa note of thanks


So the %TRIM is implied when concatenating fields into a VARYING field?

Suppose I change your example to:
qualname = lib + ' / ' + file + '( ' + mbr + ' )' or
qualname = lib + '/' + file + '(' + ' ' + mbr + ' ' + ')'

Would the spaces remain in the concatenated string in either example?

Donald R. Fisher, III
Project Manager
The Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@roomstoreeast.com

<clip>
qualname = %trim(lib) + '/' + %trim(file) + '(' + %trim(mbr) + ')'

vs

qualname = lib + '/' + file + '(' + mbr + ')'
<clip>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.