[net.lang.mod2] Bit stripping... an answer.

OC.TREI@CU20B.COLUMBIA.EDU (Peter G. Trei) (08/06/86)

    Alright, here's the 'Right Way' to strip parity in Modula-2:

PROCEDURE StripParity(VAR c:CHAR);
BEGIN
c := CHAR( BITSET(c) * BITSET(127) );
END StripParity;

this is such a trivial procedure it is clearly easier to code it in-line.

						Peter Trei
						oc.trei@cu20b

[My employer would feel insulted if anyone thought it shared veiws with me.]
-------