forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to add an item containing a comma to a list

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
JRoza
Contributor
Contributor


Joined: 17 Aug 2003
Posts: 182
Location: Netherlands

PostPosted: Sun Feb 12, 2006 8:40 pm    Post subject: How to add an item containing a comma to a list Reply with quote

Maybe I'm overlooking the obvious but at this moment I just can't figure out a working solution.
I want to add a string to a list that contains a comma like Name, Firstname but all I get is an invalid list operation.
Suspecting that the comma in the string is interpreted by the LISt command as a parameter separator I tried to solve it by using Name@CHR(44) Firstname but unfortunately with the same error as result.
Anyone an idea to get this working?

Very Happy
Jan
Back to top
View user's profile Send private message Visit poster's website
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Feb 13, 2006 12:27 am    Post subject: Reply with quote

Put the entire string in double quotes...

Code:
list add,1,"Name, Firstname"


Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
JRoza
Contributor
Contributor


Joined: 17 Aug 2003
Posts: 182
Location: Netherlands

PostPosted: Mon Feb 13, 2006 1:19 am    Post subject: Reply with quote

Thanks for the suggestion, but as it turned out I was apparently sleeping when coding that bit (must be the late hour).
It works without the quotes as well.
My mistake was that after opening a secondary dialog where the user enters the name and first name I tried to add those names to a list that was part of the main dialog.
When I changed the code to close the second dialog and activating the first again, adding to the list - even without quotes - worked as intended.

So, problem solved!

Very Happy
Jan
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group