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.

tcl "goto" command?

Old posts that have not been replied to for several years.
Locked
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

tcl "goto" command?

Post by Dedan »

I was wondering if there was any kind of "goto"
command in tcl like many other languages have.

I have saerched a bit and have come up with nothing.

Thank for any help given.
I once was an intelligent young man, now i am old and i can not remember who i was.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Where do you exactly want to make a *goto* thing? Paste a part of your code or give an example.
Once the game is over, the king and the pawn go back in the same box.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

Code: Select all


bind pubm -|- "*" protect:channel
proc protect:channel {nick uhost handle channel text} {
  global botnick my text codes caps spaces rp
  set chan [string tolower $channel]
  if {![botisop $chan] || [isop $nick $chan]} {return 0}
  if {[string length $text >= $text(large)]} {

     codes:search

     strip:codes

     caps:search

     spaces:search

     goto skip

  }
     
  strip:codes

  :skip

  badword:search

}


I once was an intelligent young man, now i am old and i can not remember who i was.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I think that can be only used in mIRC language.

cuz that's how it works there.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Nope, there is no goto command in Tcl, however, you code can be re-written to perform the same effect with an extention to the if command.

Code: Select all

bind pubm -|- "*" protect:channel
proc protect:channel {nick uhost handle channel text} {
  global botnick my text codes caps spaces rp
  set chan [string tolower $channel]
  if {![botisop $chan] || [isop $nick $chan]} {return 0}
  if {[string length $text >= $text(large)]} {

     codes:search

     strip:codes

     caps:search

     spaces:search

  } else {
    
    strip:codes
  }

  badword:search

}
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

that will work just fine.

Thanks ppslim :^)
I once was an intelligent young man, now i am old and i can not remember who i was.
Locked