Path: utzoo!attcan!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f104.n153.z1.fidonet.org!Ian.Green From: Ian.Green@f104.n153.z1.fidonet.org (Ian Green) Newsgroups: comp.lang.modula2 Subject: Re: Bitwise EXOR Message-ID: <47.2705361B@puddle.fidonet.org> Date: 28 Sep 90 02:02:15 GMT Sender: ufgate@puddle.fidonet.org (newsout1.26) Organization: FidoNet node 1:153/104 - Basic'ly HST, Surrey BC Lines: 22 Assuming that the data type is a CARDINAL then try the following: a = b XOR c ; pseudo code a := CARDINAL(BITSET(b)/BITSET(c)); ; Modula-2 By using a type transfer to convert the data into a set, set operations can then be applied. Following the operation, a type transfer is used to convert back to the original type. When I use set operations, I usually use SETs in the first place since technically the operations are set operations. Ian Green -- uucp: uunet!m2xenix!puddle!153!104!Ian.Green Internet: Ian.Green@f104.n153.z1.fidonet.org