This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

xindex

Old posts that have not been replied to for several years.
Locked
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

xindex

Post by spock »

ive seen 'xindex' be used in a few scripts.
but i cant find it in tclcommands.doc or
in the tcl8.3 manual.

does anyone know the usage?
photon?
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: xindex

Post by strikelight »

spock wrote:ive seen 'xindex' be used in a few scripts.
but i cant find it in tclcommands.doc or
in the tcl8.3 manual.

does anyone know the usage?
You are probably referring to the "xindex" procedure that was introduced by I believe KuNgFo0 used in his "own.tcl"...

It is basically a procedure to first convert a string to a list, thus allowing list operations, such as "lindex" to be properly used.

But, In my opinion, it just confuses people more, especially when they can't tell the difference in the first place between strings, lists, lindex, and xindex...
You'd be better off just doing it manually, such as:

Code: Select all

set element [lindex [split $mystring] 0]
Locked