Newsgroups: comp.sys.transputer
From: Nicolas Iselin <iselin@iam.unibe.ch>
Subject: Re: Parallel input/output error message with kroc and spoc ?
Organization: University of Berne
Date: Sat, 02 Aug 1997 16:04:07 +0200
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <33E33E57.2A5C@iam.unibe.ch>

egamess@kanaima.ciens.ucv.ve wrote:
> 
Hello,

I never used kroc or spoc, but I programmed OCCAM quite 
a lot. Your problem is that there is _possibly_ parallel
communication on c[0], namely when i is 0.

Two possibilities to solve your problem:

. Use abbreviations. If the compiler still complains,
. Disable Usage Checking !

With the old INMOS compilers, you could disable usage
checking for each compilation unit seperately. I used
this to leave unchecked critical code. But be aware,
usage checking does usually much more good than bad,
so I wouldn't disable usage checking for your whole
program.

Nicolas Iselin, iselin@iam.unibe.ch


> Hello,
> 
> I did the following segment program:
> This segment was supposed to put 10 in x, and 20 in y.
> 
>   [2]CHAN OF INT c:
>   INT x, y:
>   INT i:
>   SEQ
>     i:=1
>     PAR
>       c[0] ? x
>       c[i] ? y       -- Change i by 1 and it will be OK
>       c[0] ! 10
>       c[i] ! 20      -- Change i by 1 and it will be OK
> :
> 
> Kroc and Spoc compilers gave me an error of parallel input on channel
> c and parallel output on channel c.
> 
> If I replace i by 1, there is no compiling problem.
> 
> This is just a part of a complex program and it is not easy to
> replace i by a constant value.
> 
> How can I solve this problem ?
> How can I force the compiler to do what I want to ?
>

