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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
mecca
Newbie


Joined: 05 Oct 2005
Posts: 8

PostPosted: Sun Oct 09, 2005 10:59 am   

about the index of array
 
#var ary %array("a","b","c")
Is there a function that I can get the index of a element in ary ?
for example:
#sh %function("a",ary) -> it will show: 0
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Oct 09, 2005 4:29 pm   
 
Nope. Not strictly for arrays. Since they look just like stringlists, you could try the various stringlist functions but I've no idea if they will work on arrays.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 10, 2005 1:42 am   
 
I would suggest abandoning arrays entirely very early in any sort of script creation. The purpose of arrays in zMud is to provide proper connectivity to COM objects expecting an array format. The array system in zMud simpy is not as robust as string lists. This is because arrays are provided nearly entirely through COM objects. Learn to use string lists, they provide all the functionality of an array and then much more, and give you the option of still working with them as a regular string. Definitely well worth the extra learning.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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