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.

The ! character

Help for those learning Tcl or writing their own scripts.
Post Reply
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

The ! character

Post by vigilant »

What does it mean when you do {![command]}
And where can i read more about these? :)
Anser Quraishi
Website: http://www.anserq.com
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Presumably it means someone is trying to exploit your bot by using tcl special chars in a command attempt..
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

if you mean inside an if statement, ! means if it failed.

Code: Select all

if {[command]} { # [command] returned 1 } else { [command] returned 0 }

if {![command]} { # [command] returned 0 } else { [command returned 1 }
very rough example.
r0t3n @ #r0t3n @ Quakenet
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: The ! character

Post by Alchera »

vigilant wrote:What does it mean when you do {![command]}
And where can i read more about these? :)
Tcl Developer Site could be a good place to start.

Your example isn't complete as the logical NOT is used within a conditional statement.

Simply put (your example) means:

Code: Select all

if {NOT [command]} {
   then do something
}
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

Thanks a lot 8)
Anser Quraishi
Website: http://www.anserq.com
Post Reply