Page 1 of 1

rand_static()

Posted: Mon Sep 28, 2009 4:39 pm
by howmando4
has anyone been able to get the rand_static() thing to work? I'm not really sure how to use it - I couldn't find any examples.

Posted: Mon Sep 28, 2009 11:31 pm
by MtnViewJohn
My Op Art #1 makes use of rand_static(). The key thing about rand_static() is that each call to rand_static() results in a random number that is constant. If you have a rule with rand_static() in it then you won't get a different random number each time the rule is expanded. It will always be the same random number.

The reason why Context Free doesn't have a random function that is different each time a rule is expanded is because the Context Free execution engine is not powerful enough to do it. rand_static() is the best that we can do.The next version of Context Free will have a fully dynamic random number function.

Posted: Wed Sep 30, 2009 7:06 am
by pakin
Humor link: http://xkcd.com/221/

Okay, rand_static() at least gives a different constant each time Context Free is run. :wink: