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 


Table help (deleting multi lines)

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


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Thu Jul 21, 2005 8:23 pm    Post subject: Table help (deleting multi lines) Reply with quote

Hi,

Now I know I need to use @items() to get the data from table1, and I know I need to put the data in a list to work with it.
But my question is, how do i get the data into the table on seperate lines?

All i seem to do is get one big string on line 1 of my list.
Different entries in the table need to be on their own lines in the list.
Is it something to do with line feeding?

What am I doing wrong?

Thanks
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Jul 21, 2005 8:57 pm    Post subject: Reply with quote

Hi DW,

Don't use LIST ADD,%%someVar, instead use LIST ASSIGN,%%someVar.

LIST ASSIGN,... ensures that all @cr() delimited strings will be added to
the string list as individual items instead of one item.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Jul 22, 2005 6:23 am    Post subject: Reply with quote

Thank you, oh so very much.
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Fri Jul 22, 2005 7:29 am    Post subject: Reply with quote

Glad ta help Smile Big Smile
_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Jul 22, 2005 8:10 am    Post subject: Reply with quote

I believe list assign will first clear the list/table before adding the new items. If you want to keep the old content of a list while adding new data, use a routine like this:

Code:
# Some example data in a variable, replace this with @items()
%%tempdata = line1@cr()line2@cr()line3@cr()line4

# The contents will be added to list 1
list create,1
list add,1,Old data
list add,1,More old data
list add,1,Granny what are you doing here?

#Create a temporary list
list create,30
list assign,30,%%tempdata
%x = 0
repeat
  # Add the data line by line to list 1
  list add,1,@item(30,%x)
  %x = @succ(%x)
until @equal(%x,@count(30))
list close,30

info @text(1)
list close,1

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
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