XORSyntaxeXOR(x,y) Réunion logique exclusive de x et de y. Le résultat ne vaut 1 que si les bits de même rang des 2 opérandes sont différents. Les paramètres sont des nombres binaires au format nombre, le resultat est au format texte. ExempleXOR(1010000, 1010100) ---> "0000100" Scripton XOR(x, y) set {x, y, z} to {x as string, y as string, ""} repeat with i from 1 to the length of x if character i of x = character i of y then set z to z & 0 else set z to z & 1 end if end repeat return z end XOR
|