Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 176

PostPosted: Thu Sep 26, 2019 11:37 pm   

Best way to store a list...
 
i would like to find a way to store 10 things into a variable, each seperate from each other and the clear the variable that stored them, I'm also assuming it can store items infinitely
Could someone please help me formulate this? thanks.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Fri Sep 27, 2019 3:06 pm   
 
list=item 1|item 2|item 3
or
#VAR list {item 1|item 2|item 3}

#ADDITEM list {item 4}
To add a single item.
To add a duplicate item:
list=%additem("item 4", @list)

#DELITEM removes all instances of an item while %delitem removes the first instance only.

to clear the list you could do:
list=%null
or
#VAR list {}
_________________
Discord: Shalimarwildcat
Reply with quote
ErnestineDean
Newbie


Joined: 20 Feb 2020
Posts: 1

PostPosted: Thu Feb 20, 2020 10:49 am   
 
Your site has a lot of useful information for myself. I visit regularly
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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

© 2009 Zugg Software. Hosted by Wolfpaw.net