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.

Spaces in return proc

Old posts that have not been replied to for several years.
Locked
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Spaces in return proc

Post by BiLL »

Hi,

I got a little proc which gives me something special in "return" ;).

End is like that:

return $clr[lindex [lindex $db $num] 0]

But now I want him to return:

return $clr[lindex [lindex $db $num] 0]<space>space>

I tried:

return "$clr[lindex [lindex $db $num] 0]<space>space>"

But it doesn't work also. ( { } gets added in output )

How can I add these 2 spaces now to the end? So that the output in IRC is with 2 spaces also.
Would be great if anyone can help,

thanks.
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

Try

Code: Select all

return "  "
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

I tried that
I set everything into the "" but then the return got also a { } in it - How can I get rid of these signs?
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

that return is later used for lappend - but as soon as i put a space into it the list (done by lappened) will have a { } char :(.
anyone knows a trick for that? i tried to regsub them but didnt work :(
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Why are you creating a list if a string is what you want?
Use append, not lappend :)

(lists are just strings with some special chars escaped.)
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

Damn - you guys are so GOOD!
It works now - THANKS.
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

Hmm. I don't know what's going on, but your original post is appearing differently today than it did to me yesterday (everything after the $clr was blank) :lol:
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

weired - i didnt change it hehe!
Locked