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.

What are the TCL equivalents of these mIRC variables?

Help for those learning Tcl or writing their own scripts.
Post Reply
E
EnglishExpress
Halfop
Posts: 40
Joined: Tue Aug 14, 2007 1:28 am

What are the TCL equivalents of these mIRC variables?

Post by EnglishExpress »

$+ $1
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

$+ depends on what you name your variable in tcl (it's $variableName)
$N+ is [join [lrange [split $variable] N end]]
$1 is [lindex [split $variable] 0]
Have you ever read "The Manual"?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Isn't $+ used as some strange token to concat two strings? Ie when you need to combine a variable with a constant text without any space inbetween?
If so, there is no tcl-equivialence. Closest thing might be to enclose complex variable-names within {}.

Code: Select all

abc $+ $1 $+ def
Would simply be one of the below, depending on "point of view", with the first one being what you'd use to get info from a .dcc commandline, and second a more generic function call.

Code: Select all

"abc[lindex [split $variable] 0]def"
"abc${variable1}def"
NML_375
Post Reply