Modify

#2630 closed Feature Request (Rejected)

_XOR() and _XNOR() - new function

Reported by: mlipok Owned by:
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:

Description

Please consider adding such a function:

http://www.autoitscript.com/forum/topic/153670-operator-xor-xnor/#entry1107426

to the UDF

; Author: AdamUL
Func _XOR($A, $B)
    Return ($A Or $B) And (Not ($A And $B))
EndFunc

Func _XNOR($A, $B)
    Return Not _XOR($A, $B)
EndFunc

Attachments (0)

Change History (4)

comment:1 by Matt Diesel, on Jan 18, 2014 at 3:32:42 PM

Or BitXOR($A ? 1 : 0, $B ? 1 : 0)

Generally if it can be done in one line then there really isn't a need to add it to the standard UDFs.

comment:2 by anonymous, on Jan 19, 2014 at 5:02:42 PM

I would add it as a keyword instead (like And, Or and Not):

$A = $B XOR $C
$D = $E XNOR $F

comment:3 by mlipok, on Jan 20, 2014 at 5:35:30 PM

it would be good

comment:4 by guinness, on Feb 21, 2014 at 11:51:02 PM

Resolution: Rejected
Status: newclosed

What Mat said.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.