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.

|| 'or'

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

|| 'or'

Post by NewzUK »

Hi

Is there a command for TCL similar to || (or) in mIRC for the comparing of strings etc.?

Thanks.
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Re: || 'or'

Post by metroid »

NewzBoy wrote:Hi

Is there a command for TCL similar to || (or) in mIRC for the comparing of strings etc.?

Thanks.

Code: Select all

} else {
or

Code: Select all

} elseif {*something*} {
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

I mean within a line - it's like && but means 'or'...will try to find an example.
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

MeTroiD: you're wrong. else or else if is not the same as || (or).
In mIRC you can also use ||, for example:

Code: Select all

if (($1 == $null) || ($2 == $null)) { goto printIAL.error }
Que?
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

yep that's the thing I'm looking for for TCL :)
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

well i don't script mirc and i figured thats what he meant, if u know better post it yourself?
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

lol well thank you both - hopefull we'll find the answer soon :wink:
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

*** IN TCL ***
TCL has many string command functions and alot of operators resembling the ones in mIRC scripting. Yes || (logical OR) and && (logical AND) are availiable in TCL similar to mIRC.

http://www.sciences.univ-nantes.fr/info ... xpr.htm#M6

In tcl you have many string manipulation commands:

- string match
- string compare
- string equal
- string map
.... these are just a few.

For a list of all tcl string commands you can refer to:

http://www.tcl.tk/man/tcl8.4/TclCmd/string.htm#M3


*** IN MIRC ***
For string comparison in mIRC you might want
to see the help files, and look in the INDEX for
contents of matching. Here are some string matching
operators which I am aware of:

== 'for string comparison'
=== 'for string comparison case-sensitive'

Code: Select all

 if {$var == 1} { ...........}
 if {($var == "blabla")} { .......}
 if {($mystring === $myvar)} { ...........}
Here are some I found through the help files, of mIRC:

Code: Select all

The Operators

	==	equal to
	===	equal to (case-sensitive)
	!=	not equal to
	<	less than
	>	larger than
	>=	larger than or equal to
                <=	smaller than or equal to
	//	v2 is a multiple of v1
	\\	v2 is not a multiple of v1
	&	bitwise comparison

	isin	string v1 is in string v2
	isincs	string v1 is in string v2 (case sensitive)
	iswm	wildcard string v1 matches string v2
	isnum	number v1 is a number in the range v2
	isletter	letter v1 is a letter in the list of v2
	isalnum	text contains only letters and numbers
	isalpha	text contains only letters

	islower	text contains only lower case letters
	isupper	text contains only upper case letters

	ison	nickname v1 is on channel v2
	isop	nickname v1 is an op on channel v2
	ishop	nickname v1 is a halfop on channel v2
	isvoice	nickname v1 has a voice on channel v2
	isreg	nickname v1 is a normal nick on channel v2
	ischan	if v1 is a channel which you are on.
	isban	if v1 is a banned address in internal ban list

	isaop	if v1 is a user in your auto-op list channel v2 	isavoice	if v1 is a user in your auto-voice channel v2
	isignore	if v1 is a user in your ignore list with ignore
	isprotect	if v1 is a user in your protect list of v2
	isnotify	if v1 is a user in your notify list.
Last edited by awyeah on Mon Jul 12, 2004 9:09 pm, edited 1 time in total.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thanks awyeah :D
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

No problemo! :mrgreen: :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

XOR would be nice. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

???
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

In logic, exclusive disjunction is a logical operator. The exclusive disjunction of propositions A and B is usually called A xor B, where "xor" stands for "exclusive or" and is pronounced "eks-or".

The operation yields the result TRUE when one, and only one, of its operands is TRUE.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

oh - thought you were asking for some kind of drink or something lol
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Alchera wrote:XOR would be nice. :)
See the Tcl Manpages for expr. (Hint: ^)
Locked