concat injects spaces

Coding Questions, IDE related or anything else

concat injects spaces

Postby udo.killermann » Tue Jul 20, 2010 6:41 am

Hi Bernd,

is this behaviour intended? If I call Concat("Cat","Dog""Mouse") I expect the resulting string "CatDogMouse". The OB implementation returns "Cat Dog Mouse" with spaces embedded between the strings. Now I have to use Replace to remove these spaces.

Kind regards
Udo
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: concat injects spaces

Postby berndnoetscher » Tue Jul 20, 2010 12:47 pm

udo.killermann wrote:Hi Bernd,

is this behaviour intended? If I call Concat("Cat","Dog""Mouse") I expect the resulting string "CatDogMouse". The OB implementation returns "Cat Dog Mouse" with spaces embedded between the strings. Now I have to use Replace to remove these spaces.

Kind regards
Udo


Hi Udo,
do think without spaces would be better?
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am

Re: concat injects spaces

Postby udo.killermann » Wed Jul 21, 2010 6:59 am

Bernd,

I think you should omit the spaces in the Concat function. You could add a function ConactWithSpaces if you think this behaviour is needed.

Regards
Udo

BTW: How do Perl or awk concat strings? I think they don't add spaces - but have a look yourself.
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: concat injects spaces

Postby berndnoetscher » Wed Jul 21, 2010 12:43 pm

Thanks for the ideas. Will do it for the next releases...
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am


Return to Objective-Basic (Xcode 3)

Who is online

Users browsing this forum: No registered users and 0 guests

cron