[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | FOCUS, from INFORMATION BUILDERS |
|
Moderator: | ZAYIUS::BROUILLETTE |
|
Created: | Thu Feb 19 1987 |
Last Modified: | Mon May 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 615 |
Total number of notes: | 1779 |
473.0. "Temp Fix for soft concatenation problem." by HAMSTR::BAMFORTH () Thu Oct 24 1991 17:59
FOCUS VERSION 6.1 no longer performs certain soft concatenation
correctly.
e.g. given FIRST_NAME/A20 = 'JOHN';
LAST_NAME/A15 = 'DOE';
the following operation
FULL_NAME/A36 = FIRST_NAME || ' ' | LAST_NAME;
no longer produces 'JOHN DOE'
but instead produces 'JOHN DOE'
The following is a work-around for this problem.
DEFINE FILE yourfile
FIRST_NAME/A20 = 'JOHN';
LAST_NAME/A15 = 'DOE';
END_POS/I2 = POSIT(FIRST_NAME,20,' ',2,END_POS);
-* ^^ 2 spaces above
FULL_NAME/A36 = FIRST_NAME;
FULL_NAME = OVRLAY(FULL_NAME,36,LAST_NAME,15,END_POS+1,
FULL_NAME);
END
END_POS returns the position immediately following the last non-blank
character in FIRST_NAME.
OVRLAY overlays the LAST_NAME string at END_POS + 1, leaving a space
between the first and last names.
T.R | Title | User | Personal Name | Date | Lines |
---|
473.1 | Keep it simple | RDGE44::KEEGAN_9 | | Fri Oct 25 1991 03:13 | 7 |
| Even easier...
FULL_NAME/A36 = FIRST_NAME || (' ' | LAST_NAME);
Paul K
|
473.2 | KISS principle revisited. | HAMSTR::BAMFORTH | | Fri Oct 25 1991 12:14 | 2 |
|
Excellent, I didn't even think to try this...
|