|
Fizgar Magician
Joined: 07 Feb 2002 Posts: 333 Location: Central Virginia
|
Posted: Mon Nov 29, 2010 3:38 am
[3.32] %item helpfile needs update |
The help file for %item currently reads:
Quote: |
item
Syntax: %item(list, n)
returns the nth item of the given stringlist.
As of version 2.06, this function can also be used to retrieve the nth key in a database variable.
Example:
#SHOW %item("Athos|Bertrand|Caesar",3)
displays: Caesar |
It retrieves the nth value not the nth key of the database variables. |
|
_________________ Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34 |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Nov 29, 2010 1:37 pm |
[edited]
Are you sure that it is giving the nth value of a db variable? Can you give an example? It is supposed to give the nth key, as the helpfile says. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 29, 2010 6:36 pm |
No, Fixgar is correct. %item returns the *value* and not the key. Use %dbkey for the key. I'll update the help file for %item
|
|
|
|
|
|