Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!cs395t54 From: cs395t54@cs.utexas.edu (Pow Hwee Tan) Newsgroups: comp.sys.transputer Subject: Re: Dynamically creating arrays of processes Keywords: Non VAL limits in PAR FORs Message-ID: <5102@cs.utexas.edu> Date: 26 Mar 89 05:12:31 GMT References: <2380@buengc.BU.EDU> <4526@cloud9.Stratus.COM> Sender: news@cs.utexas.edu Organization: U. Texas CS Dept., Austin, Texas Lines: 24 Although Occam does not allow dynamic creating of processes, there is a way of getting around it, which is mentioned in Alan Burn's book on Occam programming. This method requires you to know the maximum number of processes you want to create. Suppose the max number of processes is max.p and the variable number of processes you want to create is amount.p then one can write this in the program: PAR i = 0 FOR max.p IF i >= amount.p -- extra process SKIP -- skip them TRUE SEQ -- insert what you want to do here. Note that this method still requires static binding on the number of processes you can create at compile time, and you will waste some amount of CPU time because of the extra processes created and SKIP. ph