[Oberon] Type conversion.

peter at easthope.ca peter at easthope.ca
Sun Jul 2 07:14:58 CEST 2023


ETH Oberon (2019) Language Report
p. 56,
12.1.1. Conversions 
LONG(x) ... DEPRECATED

oberon/source/Unix.Oberon.NetSystem.Mod
	PROCEDURE OpenConnection* ( VAR conn: Connection; locPort: UNSIGNED16; remIP: IPAdr; remPort: UNSIGNED16;
													VAR res: SIGNED16 );
	VAR r: SIGNED32;
	BEGIN
		IF remPort = anyport THEN remIP := anyIP END;
		NEW( conn );
		conn.Open( locPort, remIP, LONG(remPort) MOD 10000H, r );
		IF r = TCP.Ok THEN res := done  ELSE  res := error  END
	END OpenConnection;

If LONG is removed, conn.Open won't agree on the type of the 3rd 
parameter. Is there another way to convert a type?  The declaration of 
Open also needs a change?

Thx,                           ... P.L.

- 
mobile: +1 778 951 5147
VoIP:   +1 604 670 0140



More information about the Oberon mailing list