🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.transputer
Article #2157

OCCAM

#2157
From: Francoise Carre
Date: Wed, 03 Aug 1988 10:26
27 lines
1006 bytes
Could someone help me about the following problem in OCCAM?

I want to place on each transputer of the network a process defined as:
VAL INT n IS 4:
PROC node([n]CHAN OF ANY C)
  .............
  PAR i = 0 FOR n
    ...... with use of C[i]
:

BUT, the compiler refuses such a declaration, because formal parameter
is an array of CHAN, as explained p78 of User Manual.

Does it exist a way to produce the same effect, other than:
PROC node(CHAN OF ANY C1,C2, ... Cn)
  .............
  PAR
    ... use of C1
    ... same use of C2
    
    ... same use of Cn
:
this solution is first not elegant, and secondly it has to be changed
manually when n is changed !!!!!

Thanks for your Help,
Francoise Carre, Laboratoires de Marcoussis, France.
Technical Details
Message-ID: <3579@crcge1.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!inria!crcge1!carre

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!inria!crcge1!carre
From: carre@crcge1.UUCP (Francoise Carre)
Newsgroups: comp.sys.transputer
Subject: OCCAM
Keywords: array of CHAN
Message-ID: <3579@crcge1.UUCP>
Date: 3 Aug 88 10:26:05 GMT
Lines: 27