I believe the 1800-2005 spec says that self is a static function - I'd expect it to then be written like this: process::self().srandom(100); Is this right? --Mike Burns Ryan, Ray wrote: > I entered mantis #1391 for the following > > In section 13.13.2 the example contains the statement: > process::self.srandom(100); > > This is not a valid call to srandom. In this statement, the prefix of > srandom is "process::self". This is a reference to the scope of the self > method - not a call to the self function. The scope of the self method > does NOT include the srandom method. > > A correct example should read: > integer x, y, z; > fork //set a seed at the start of a thread > begin > process pvar; > pvar = process::self; > pvar.srandom(100); > x = $urandom; > end > //set a seed during a thread > begin > process pvar; > pvar = process::self; > y = $urandom; > pvar.srandom(200); > end > // draw 2 values from the thread RNG > begin z = $urandom + $urandom ; end > join > > > - Ray >Received on Tue Mar 21 18:19:18 2006
This archive was generated by hypermail 2.1.8 : Tue Mar 21 2006 - 18:19:26 PST