UNPKG

@abaplint/runtime

Version:
28 lines 926 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.z = z; const m_1 = require("./m"); // bitwise compare function z(operand1, operand2) { let operand1Bits = (0, m_1.hexToBinary)(operand1); const operand2Bits = (0, m_1.hexToBinary)(operand2); if (operand1Bits.length < operand2Bits.length) { operand1Bits = operand1Bits.padEnd(operand2Bits.length, "0"); } let oneFound = false; // let zeroFound = false; for (let index = 0; index < operand2Bits.length; index++) { const o1bit = operand1Bits.substring(index, index + 1); const o2bit = operand2Bits.substring(index, index + 1); if (o2bit === "1") { if (o1bit === "1") { oneFound = true; } else { // zeroFound = true; } } } return oneFound === false; } //# sourceMappingURL=z.js.map