🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.transputer
Article #1754

Discriminated protocols

#1754
From: ka Khalid Akram student-davidunt...
Date: Fri, 18 Dec 1992 20:09
40 lines
1389 bytes
Hi,

how does one implement discriminated protocols using INMOS ANSI C?

Eg in Occam:

	PROTOCOL NUMBER IS
	  CASE
	    whole; INT64
	    floating; REAL64
	    complex; REAL64; REAL64
	:

then when inputing:

	c ? CASE
	  whole; n
	    ...
	  floating; r
	    ...
	  complex; r; theta
	    ...

I need to use two varying length messages; one of 39 integers and one of
simply two integers.

Can this be done somehow using INMOS ANSI C?

Any help would be much appreciated.

Khalid

*===============================================================*
# Khalid Akram (Lahori)		 #
# ka@uk.ac.rl.inf		 #  still thinking ....
# University of West England	 #
# Rutherford Appleton Laboratory #
# 0235-445867			 #
*===============================================================*
Technical Details
Message-ID: <1992Dec21.132719.23839@hubcap.clemson.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!sdd.hp.com!ncr-sd!ncrcae!hubcap!fpst

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.transputer,comp.parallel
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!sdd.hp.com!ncr-sd!ncrcae!hubcap!fpst
From: ka@wan.inf.rl.ac.uk( (Khalid Akram \(student-david;until 31/12/92\))
Subject: Discriminated protocols
Message-ID: <1992Dec21.132719.23839@hubcap.clemson.edu>
Followup-To: comp.sys.transputer
Keywords: Occam, ANSI C
Sender: news@inf.rl.ac.uk
Reply-To: ka@hardy.inf.rl.ac.uk
Organization: SERC Rutherford Appleton Laboratories
Date: 18 Dec 92 20:09:37 GMT
Approved: parallel@hubcap.clemson.edu
Lines: 42