rand_static()
Moderators: MtnViewJohn, chris, mtnviewmark
rand_static()
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.
[null]
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
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.
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.
Humor link: http://xkcd.com/221/
Okay, rand_static() at least gives a different constant each time Context Free is run.
Okay, rand_static() at least gives a different constant each time Context Free is run.