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.

combining 'set' operations

Old posts that have not been replied to for several years.
Locked
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

combining 'set' operations

Post by NewzUK »

Hi - is there a way I can combine these 3 operations for setting a variable into one line to simplify things?

Code: Select all

set mkw [gettok $line 4- 32]
set mkw [string map {"\[\[12\]" "\["} $mkw]
set mkw [string toupper $mkw]
Thanks in advance!
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

set mkw [string toupper [string map {"\[\[12\]" "\["} [gettok $line 4- 32]]]
Elen sila lúmenn' omentielvo
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

ah thanks Papillon :D
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
Locked