[Oberon] ETH Oberon, source NetSystem.SetUser*.

Michael Schierl schierlm at gmx.de
Sun Jun 6 21:01:19 CEST 2021


Hello Peter,


Am 06.06.2021 um 17:27 schrieb peter at easthope.ca:
> == Reference ==
> https://en.wikibooks.org/wiki/Oberon/ETH_Oberon/NetSystem.Mod
>
> == Observation ==
> Excerpt from the body of SetUser.
>
>   BEGIN
> 	Texts.OpenReader(R, Oberon.Par.text, Oberon.Par.pos);
> 	ok := TRUE;  entered[0] := 0X;  verbose := FALSE;
> 	...
> 			IF host[0] # 0X THEN
> 				IF (usr[0] = 0X) OR ((pwd[0] = 0X) & (entered[0] = 0X)) THEN
> 	...
> 				IF pwd[0] = 0X THEN	(* no pwd specified *)
> 					IF entered[0] = 0X THEN	(* prompt first time *)
> 						InputStr("Enter password: ", FALSE, entered);
>
> == Question ==
> Isn't (entered[0] = 0X) inevitable when the IF statements are executed?

No.

> The two ests, entered[0] = 0X, are redundant?

No.

In your except you missed a WHILE loop. There is a comment above the
SetUser procedure declaration that describes why there may be multiple
URLs in one call to SetUser. entered[0] is only 0X for the first of them.


Regards,


Michael


More information about the Oberon mailing list