[Oberon] _Non_sequitur_ in ConfigInput?

peter at easthope.ca peter at easthope.ca
Thu Apr 17 21:04:17 CEST 2014


Hi,

This is meant to be more a question than a criticism.  If 
I'm on the right track, a tiny clarification in source code 
is possible.  Certainly no offense to pjm is intended.

This is from ETH Oberon / PC Native 05.01.2003, the last alpha release.

MODULE ConfigInput;	(* pjm *)
   ...
BEGIN
	   ...
	Kernel.GetConfig("PS2", mp);
	ps2 := mp # "0"; 
	   ...
END ConfigInput.

The PS2 configuration string can be "" or "0" or "1" 
for detection of a PS/2 mouse being unspecified or  
inhibited or requested.
mp represents the mouse port number for a serial mouse  
with possible values "", "0", "1", "2" & "3".

'Kernel.GetConfig("PS2", mp);' is peculiar.  Although all the values 
are strings or arrays of characters, the flag for detection of a PS/2 
mouse being put where a port number should be, is confusing.

What about 
	Kernel.GetConfig("MP", mp);
	Kernel.GetConfig("PS2", ps2);
	IF ps2 = "" THEN ps2 := "1"; 
?  
An additional statement is needed but the intention is more clear.
If someone can offer a better explanation, thanks, 
                           ... Peter E.



-- 
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202  http://carnot.yi.org/  New address Bcc: peter at easthope. ca




More information about the Oberon mailing list