[Oberon] Correction; ORD usage & etc.

peter at easthope.ca peter at easthope.ca
Sat Jan 30 20:40:52 CET 2016


From: peter at easthope.ca (Peter Easthope), Fri, 16 Oct 2015 18:39:58 -0500
>   menuH := Fonts.Default.height + 2;
>   barW := menuH;
>   INC(menuH, ORD(Modern) * 6);

The argument of ORD is CHAR; not BOOLEAN.  This is more likely to succeed.

	(* Kronecker delta *)
	PROCEDURE Kd(b: BOOLEAN): INTEGER;
		BEGIN IF b THEN RETURN 1 ELSE RETURN 0 END  END Kd;
  ...
    INC(menuH, Kd(Modern) * 6);

The genuine Kronecker delta tests equality of two arguments.  
So this is a distortion; but understandable.

Regards,             ... Lyall E.

-- 
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202 
http://easthope.ca/Peter.html Bcc: peter at easthope. ca



More information about the Oberon mailing list