Alastair
I think it might be that RBase is stripping the ending space. I added a
space before each color and that seems to work ok.
CLE ALL VAR
SET VAR v1 TEXT = ('Light,Dark')
SET VAR v2 TEXT = ('| Blue,| Red,| Green')
SET VAR vCount INTEGER = 1
SET VAR v3 = (SRPL(.v2, '|',(SSUB(.v1, .vCount)),0))
SHOW VAR v3
Buddy
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alastair
Burr
Sent: Wednesday, October 22, 2008 9:52 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - A little SRPL oddity
I must be missing something obvious so can any please explain what I'm
doing wrong:
SET VAR v1 TEXT = 'Light,Dark'
SET VAR v2 TEXT = '|Blue,|Red,|Green'
SET VAR vCount INTEGER = 1
SET VAR v3 = (SRPL(.v2, '|', ( (SSUB(.v1, .vCount)) + ' '), 0)) --
that's a single space added
SHOW VAR v3
should give me: Light Blue,Light Red,Light Green
but actually gives me: LightBlue,LightRed,LightGreen
ie: no spaces.
If I put a hyphen, for example, in place of the space I get hyphenated
results.
The obvious (to me) answer was to use a hard space (CHAR(0160)) but that
causes me problems further on as a hard space is not equal to an
ordinary space (obviously).
The solution for that is another SRPL to replace hard spaces with
ordinary ones.
It just seems a long way around so am I wrong to expect var v3 to work?
Thanks for any help & regards,
Alastair
----------------------------
Alastair Burr
St. Albans, UK.
[EMAIL PROTECTED]
-----------------------------