home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / transput / 1347 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.4 KB

  1. Xref: sparky comp.sys.transputer:1347 comp.parallel:2774
  2. Newsgroups: comp.sys.transputer,comp.parallel
  3. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!sdd.hp.com!ncr-sd!ncrcae!hubcap!fpst
  4. From: ka@wan.inf.rl.ac.uk( (Khalid Akram \(student-david;until 31/12/92\))
  5. Subject: Discriminated protocols
  6. Message-ID: <1992Dec21.132719.23839@hubcap.clemson.edu>
  7. Followup-To: comp.sys.transputer
  8. Keywords: Occam, ANSI C
  9. Sender: news@inf.rl.ac.uk
  10. Reply-To: ka@hardy.inf.rl.ac.uk
  11. Organization: SERC Rutherford Appleton Laboratories
  12. Date: 18 Dec 92 20:09:37 GMT
  13. Approved: parallel@hubcap.clemson.edu
  14. Lines: 42
  15.  
  16.  
  17. Hi,
  18.  
  19. how does one implement discriminated protocols using INMOS ANSI C?
  20.  
  21. Eg in Occam:
  22.  
  23.     PROTOCOL NUMBER IS
  24.       CASE
  25.         whole; INT64
  26.         floating; REAL64
  27.         complex; REAL64; REAL64
  28.     :
  29.  
  30. then when inputing:
  31.  
  32.     c ? CASE
  33.       whole; n
  34.         ...
  35.       floating; r
  36.         ...
  37.       complex; r; theta
  38.         ...
  39.  
  40. I need to use two varying length messages; one of 39 integers and one of
  41. simply two integers.
  42.  
  43. Can this be done somehow using INMOS ANSI C?
  44.  
  45. Any help would be much appreciated.
  46.  
  47. Khalid
  48.  
  49. *===============================================================*
  50. # Khalid Akram (Lahori)         #
  51. # ka@uk.ac.rl.inf         #  still thinking ....
  52. # University of West England     #
  53. # Rutherford Appleton Laboratory #
  54. # 0235-445867             #
  55. *===============================================================*
  56.  
  57.  
  58.